src/cpu/zero/vm/frame_zero.inline.hpp

Tue, 23 Nov 2010 13:22:55 -0800

author
stefank
date
Tue, 23 Nov 2010 13:22:55 -0800
changeset 2314
f95d63e2154a
parent 1907
c18cbe5936b8
child 3433
eaa9557116a2
permissions
-rw-r--r--

6989984: Use standard include model for Hospot
Summary: Replaced MakeDeps and the includeDB files with more standardized solutions.
Reviewed-by: coleenp, kvn, kamg

     1 /*
     2  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     8  * published by the Free Software Foundation.
     9  *
    10  * This code is distributed in the hope that it will be useful, but WITHOUT
    11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    13  * version 2 for more details (a copy is included in the LICENSE file that
    14  * accompanied this code).
    15  *
    16  * You should have received a copy of the GNU General Public License version
    17  * 2 along with this work; if not, write to the Free Software Foundation,
    18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    19  *
    20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21  * or visit www.oracle.com if you need additional information or have any
    22  * questions.
    23  *
    24  */
    26 #ifndef CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
    27 #define CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
    29 // Constructors
    31 inline frame::frame() {
    32   _zeroframe = NULL;
    33   _sp = NULL;
    34   _pc = NULL;
    35   _cb = NULL;
    36   _deopt_state = unknown;
    37 }
    39 inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
    40   _zeroframe = zf;
    41   _sp = sp;
    42   switch (zeroframe()->type()) {
    43   case ZeroFrame::ENTRY_FRAME:
    44     _pc = StubRoutines::call_stub_return_pc();
    45     _cb = NULL;
    46     break;
    48   case ZeroFrame::INTERPRETER_FRAME:
    49     _pc = NULL;
    50     _cb = NULL;
    51     break;
    53   case ZeroFrame::SHARK_FRAME:
    54     _pc = zero_sharkframe()->pc();
    55     _cb = CodeCache::find_blob_unsafe(pc());
    56     break;
    58   case ZeroFrame::FAKE_STUB_FRAME:
    59     _pc = NULL;
    60     _cb = NULL;
    61     break;
    63   default:
    64     ShouldNotReachHere();
    65   }
    66   _deopt_state = not_deoptimized;
    67 }
    69 // Accessors
    71 inline intptr_t* frame::sender_sp() const {
    72   return fp() + 1;
    73 }
    75 inline intptr_t* frame::link() const {
    76   ShouldNotCallThis();
    77 }
    79 #ifdef CC_INTERP
    80 inline interpreterState frame::get_interpreterState() const {
    81   return zero_interpreterframe()->interpreter_state();
    82 }
    84 inline intptr_t** frame::interpreter_frame_locals_addr() const {
    85   return &(get_interpreterState()->_locals);
    86 }
    88 inline intptr_t* frame::interpreter_frame_bcx_addr() const {
    89   return (intptr_t*) &(get_interpreterState()->_bcp);
    90 }
    92 inline constantPoolCacheOop* frame::interpreter_frame_cache_addr() const {
    93   return &(get_interpreterState()->_constants);
    94 }
    96 inline methodOop* frame::interpreter_frame_method_addr() const {
    97   return &(get_interpreterState()->_method);
    98 }
   100 inline intptr_t* frame::interpreter_frame_mdx_addr() const {
   101   return (intptr_t*) &(get_interpreterState()->_mdx);
   102 }
   104 inline intptr_t* frame::interpreter_frame_tos_address() const {
   105   return get_interpreterState()->_stack + 1;
   106 }
   107 #endif // CC_INTERP
   109 inline int frame::interpreter_frame_monitor_size() {
   110   return BasicObjectLock::size();
   111 }
   113 inline intptr_t* frame::interpreter_frame_expression_stack() const {
   114   intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end();
   115   return monitor_end - 1;
   116 }
   118 inline jint frame::interpreter_frame_expression_stack_direction() {
   119   return -1;
   120 }
   122 // Return a unique id for this frame. The id must have a value where
   123 // we can distinguish identity and younger/older relationship. NULL
   124 // represents an invalid (incomparable) frame.
   125 inline intptr_t* frame::id() const {
   126   return fp();
   127 }
   129 inline JavaCallWrapper* frame::entry_frame_call_wrapper() const {
   130   return zero_entryframe()->call_wrapper();
   131 }
   133 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
   134   ShouldNotCallThis();
   135 }
   137 inline oop frame::saved_oop_result(RegisterMap* map) const {
   138   ShouldNotCallThis();
   139 }
   141 inline bool frame::is_older(intptr_t* id) const {
   142   ShouldNotCallThis();
   143 }
   145 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
   146   ShouldNotCallThis();
   147 }
   149 inline intptr_t* frame::unextended_sp() const {
   150   if (zeroframe()->is_shark_frame())
   151     return zero_sharkframe()->unextended_sp();
   152   else
   153     return (intptr_t *) -1;
   154 }
   156 #endif // CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP

mercurial