annotate src/cpu/zero/vm/frame_zero.inline.hpp @ 5819:39f4affc6564

8143245: Zero build requires disabled warnings 8022956: Clang: enable return type warnings on BSD Summary: Based on work of Severin Gehwolf <sgehwolf@redhat.com> & Christian Thalinger <cthalinger@twitter.com> with additions for 7-only cases Reviewed-by: dholmes, coleenp, sla
author andrew
date Tue, 13 Feb 2018 06:42:27 +0000
parents ff18bcebe294
children
rev   line source
never@1010 1 /*
amurillo@4155 2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
andrew@4964 3 * Copyright (c) 2013 Red Hat, Inc.
never@1010 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
never@1010 5 *
never@1010 6 * This code is free software; you can redistribute it and/or modify it
never@1010 7 * under the terms of the GNU General Public License version 2 only, as
never@1010 8 * published by the Free Software Foundation.
never@1010 9 *
never@1010 10 * This code is distributed in the hope that it will be useful, but WITHOUT
never@1010 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
never@1010 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
never@1010 13 * version 2 for more details (a copy is included in the LICENSE file that
never@1010 14 * accompanied this code).
never@1010 15 *
never@1010 16 * You should have received a copy of the GNU General Public License version
never@1010 17 * 2 along with this work; if not, write to the Free Software Foundation,
never@1010 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
never@1010 19 *
trims@1472 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1472 21 * or visit www.oracle.com if you need additional information or have any
trims@1472 22 * questions.
never@1010 23 *
never@1010 24 */
never@1010 25
stefank@1879 26 #ifndef CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
stefank@1879 27 #define CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
stefank@1879 28
never@1010 29 // Constructors
never@1010 30
never@1010 31 inline frame::frame() {
twisti@1425 32 _zeroframe = NULL;
never@1010 33 _sp = NULL;
never@1010 34 _pc = NULL;
never@1010 35 _cb = NULL;
never@1010 36 _deopt_state = unknown;
never@1010 37 }
never@1010 38
andrew@5819 39 inline address frame::sender_pc() const { ShouldNotCallThis(); return NULL; }
amurillo@4155 40
twisti@1425 41 inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
twisti@1425 42 _zeroframe = zf;
never@1010 43 _sp = sp;
never@1010 44 switch (zeroframe()->type()) {
never@1010 45 case ZeroFrame::ENTRY_FRAME:
never@1010 46 _pc = StubRoutines::call_stub_return_pc();
never@1010 47 _cb = NULL;
never@1010 48 break;
never@1010 49
never@1010 50 case ZeroFrame::INTERPRETER_FRAME:
never@1010 51 _pc = NULL;
never@1010 52 _cb = NULL;
never@1010 53 break;
never@1010 54
never@1010 55 case ZeroFrame::SHARK_FRAME:
never@1010 56 _pc = zero_sharkframe()->pc();
never@1010 57 _cb = CodeCache::find_blob_unsafe(pc());
never@1010 58 break;
never@1010 59
never@1010 60 case ZeroFrame::FAKE_STUB_FRAME:
never@1010 61 _pc = NULL;
never@1010 62 _cb = NULL;
never@1010 63 break;
never@1010 64
never@1010 65 default:
never@1010 66 ShouldNotReachHere();
never@1010 67 }
never@1010 68 _deopt_state = not_deoptimized;
never@1010 69 }
never@1010 70
never@1010 71 // Accessors
never@1010 72
never@1010 73 inline intptr_t* frame::sender_sp() const {
twisti@1425 74 return fp() + 1;
never@1010 75 }
never@1010 76
bdelsart@3087 77 inline intptr_t* frame::real_fp() const {
bdelsart@3087 78 return fp();
bdelsart@3087 79 }
bdelsart@3087 80
never@1010 81 inline intptr_t* frame::link() const {
never@1010 82 ShouldNotCallThis();
andrew@5819 83 return NULL;
never@1010 84 }
never@1010 85
never@1010 86 #ifdef CC_INTERP
never@1010 87 inline interpreterState frame::get_interpreterState() const {
never@1010 88 return zero_interpreterframe()->interpreter_state();
never@1010 89 }
never@1010 90
never@1010 91 inline intptr_t** frame::interpreter_frame_locals_addr() const {
never@1010 92 return &(get_interpreterState()->_locals);
never@1010 93 }
never@1010 94
never@1010 95 inline intptr_t* frame::interpreter_frame_bcx_addr() const {
never@1010 96 return (intptr_t*) &(get_interpreterState()->_bcp);
never@1010 97 }
never@1010 98
never@1010 99 inline constantPoolCacheOop* frame::interpreter_frame_cache_addr() const {
never@1010 100 return &(get_interpreterState()->_constants);
never@1010 101 }
never@1010 102
never@1010 103 inline methodOop* frame::interpreter_frame_method_addr() const {
never@1010 104 return &(get_interpreterState()->_method);
never@1010 105 }
never@1010 106
never@1010 107 inline intptr_t* frame::interpreter_frame_mdx_addr() const {
never@1010 108 return (intptr_t*) &(get_interpreterState()->_mdx);
never@1010 109 }
never@1010 110
never@1010 111 inline intptr_t* frame::interpreter_frame_tos_address() const {
never@1010 112 return get_interpreterState()->_stack + 1;
never@1010 113 }
never@1010 114 #endif // CC_INTERP
never@1010 115
never@1010 116 inline int frame::interpreter_frame_monitor_size() {
never@1010 117 return BasicObjectLock::size();
never@1010 118 }
never@1010 119
never@1010 120 inline intptr_t* frame::interpreter_frame_expression_stack() const {
never@1010 121 intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end();
never@1010 122 return monitor_end - 1;
never@1010 123 }
never@1010 124
never@1010 125 inline jint frame::interpreter_frame_expression_stack_direction() {
never@1010 126 return -1;
never@1010 127 }
never@1010 128
never@1010 129 // Return a unique id for this frame. The id must have a value where
never@1010 130 // we can distinguish identity and younger/older relationship. NULL
never@1010 131 // represents an invalid (incomparable) frame.
never@1010 132 inline intptr_t* frame::id() const {
twisti@1425 133 return fp();
never@1010 134 }
never@1010 135
andrew@4964 136 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
never@1010 137 return zero_entryframe()->call_wrapper();
never@1010 138 }
never@1010 139
never@1010 140 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
never@1010 141 ShouldNotCallThis();
never@1010 142 }
never@1010 143
never@1010 144 inline oop frame::saved_oop_result(RegisterMap* map) const {
never@1010 145 ShouldNotCallThis();
andrew@5819 146 return NULL;
never@1010 147 }
never@1010 148
never@1010 149 inline bool frame::is_older(intptr_t* id) const {
never@1010 150 ShouldNotCallThis();
andrew@5819 151 return false;
never@1010 152 }
never@1010 153
never@1010 154 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
never@1010 155 ShouldNotCallThis();
andrew@5819 156 return NULL;
never@1010 157 }
never@1010 158
never@1010 159 inline intptr_t* frame::unextended_sp() const {
never@1010 160 if (zeroframe()->is_shark_frame())
never@1010 161 return zero_sharkframe()->unextended_sp();
never@1010 162 else
never@1010 163 return (intptr_t *) -1;
never@1010 164 }
stefank@1879 165
stefank@1879 166 #endif // CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP