frame.inline.hpp revision 1472:c18cbe5936b8
1155131Srwatson/*
2155131Srwatson * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
3155131Srwatson * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4155131Srwatson *
5155131Srwatson * This code is free software; you can redistribute it and/or modify it
6155131Srwatson * under the terms of the GNU General Public License version 2 only, as
7155131Srwatson * published by the Free Software Foundation.
8155131Srwatson *
9155131Srwatson * This code is distributed in the hope that it will be useful, but WITHOUT
10155131Srwatson * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11155131Srwatson * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12155131Srwatson * version 2 for more details (a copy is included in the LICENSE file that
13155131Srwatson * accompanied this code).
14155131Srwatson *
15155131Srwatson * You should have received a copy of the GNU General Public License version
16155131Srwatson * 2 along with this work; if not, write to the Free Software Foundation,
17155131Srwatson * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18155131Srwatson *
19155131Srwatson * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20155131Srwatson * or visit www.oracle.com if you need additional information or have any
21155131Srwatson * questions.
22155131Srwatson *
23155131Srwatson */
24155131Srwatson
25155131Srwatson// This file holds platform-independent bodies of inline functions for frames.
26155131Srwatson
27155131Srwatson// Note: The bcx usually contains the bcp; however during GC it contains the bci
28155131Srwatson//       (changed by gc_prologue() and gc_epilogue()) to be methodOop position
29155131Srwatson//       independent. These accessors make sure the correct value is returned
30155131Srwatson//       by testing the range of the bcx value. bcp's are guaranteed to be above
31155131Srwatson//       max_method_code_size, since methods are always allocated in OldSpace and
32155131Srwatson//       Eden is allocated before OldSpace.
33155131Srwatson//
34155131Srwatson//       The bcp is accessed sometimes during GC for ArgumentDescriptors; than
35155131Srwatson//       the correct translation has to be performed (was bug).
36155131Srwatson
37155131Srwatsoninline bool frame::is_bci(intptr_t bcx) {
38155131Srwatson#ifdef _LP64
39155131Srwatson  return ((uintptr_t) bcx) <= ((uintptr_t) max_method_code_size) ;
40155131Srwatson#else
41155131Srwatson  return 0 <= bcx && bcx <= max_method_code_size;
42155131Srwatson#endif
43155131Srwatson}
44155131Srwatson
45155131Srwatsoninline bool frame::is_entry_frame() const {
46155131Srwatson  return StubRoutines::returns_to_call_stub(pc());
47155131Srwatson}
48155131Srwatson
49155131Srwatsoninline bool frame::is_first_frame() const {
50155131Srwatson  return is_entry_frame() && entry_frame_is_first();
51155131Srwatson}
52155131Srwatson
53155131Srwatson// here are the platform-dependent bodies:
54155131Srwatson
55155131Srwatson# include "incls/_frame_pd.inline.hpp.incl"
56155131Srwatson