entryFrame_zero.hpp revision 1010:354d3184f6b2
146283Sdfr/*
2130803Smarcel * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
398944Sobrien * Copyright 2008 Red Hat, Inc.
446283Sdfr * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
598944Sobrien *
646283Sdfr * This code is free software; you can redistribute it and/or modify it
798944Sobrien * under the terms of the GNU General Public License version 2 only, as
898944Sobrien * published by the Free Software Foundation.
998944Sobrien *
1098944Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT
1146283Sdfr * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1298944Sobrien * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1398944Sobrien * version 2 for more details (a copy is included in the LICENSE file that
1498944Sobrien * accompanied this code).
1598944Sobrien *
1646283Sdfr * You should have received a copy of the GNU General Public License version
1798944Sobrien * 2 along with this work; if not, write to the Free Software Foundation,
1898944Sobrien * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1998944Sobrien *
2098944Sobrien * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
2146283Sdfr * CA 95054 USA or visit www.sun.com if you need additional information or
2246283Sdfr * have any questions.
2346283Sdfr *
2446283Sdfr */
2546283Sdfr
2646283Sdfr// |  ...               |
2746283Sdfr// +--------------------+  ------------------
2846283Sdfr// | parameter n-1      |       low addresses
2946283Sdfr// |  ...               |
3046283Sdfr// | parameter 0        |
3146283Sdfr// | call_wrapper       |
3246283Sdfr// | frame_type         |
3346283Sdfr// | next_frame         |      high addresses
3446283Sdfr// +--------------------+  ------------------
3546283Sdfr// |  ...               |
3646283Sdfr
3746283Sdfrclass EntryFrame : public ZeroFrame {
3846283Sdfr private:
3946283Sdfr  EntryFrame() : ZeroFrame() {
4046283Sdfr    ShouldNotCallThis();
4146283Sdfr  }
4246283Sdfr
4346283Sdfr protected:
4446283Sdfr  enum Layout {
4546283Sdfr    call_wrapper_off = jf_header_words,
4646283Sdfr    header_words
4746283Sdfr  };
4846283Sdfr
4946283Sdfr public:
5046283Sdfr  static EntryFrame *build(ZeroStack*       stack,
5146283Sdfr                           const intptr_t*  parameters,
5246283Sdfr                           int              parameter_words,
5346283Sdfr                           JavaCallWrapper* call_wrapper);
5446283Sdfr public:
5546283Sdfr  JavaCallWrapper *call_wrapper() const {
5646283Sdfr    return (JavaCallWrapper *) value_of_word(call_wrapper_off);
5746283Sdfr  }
58130803Smarcel
5946283Sdfr public:
6046283Sdfr  void identify_word(int   frame_index,
6198944Sobrien                     int   offset,
6298944Sobrien                     char* fieldbuf,
6398944Sobrien                     char* valuebuf,
6446283Sdfr                     int   buflen) const;
65130803Smarcel};
66130803Smarcel