11/*
2- * Copyright (c) 2008, 2023 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2008, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -80,7 +80,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
8080 // ok. adapter blobs never have a frame complete and are never ok.
8181
8282 if (!_cb->is_frame_complete_at (_pc)) {
83- if (_cb->is_compiled () || _cb->is_adapter_blob () || _cb->is_runtime_stub ()) {
83+ if (_cb->is_nmethod () || _cb->is_adapter_blob () || _cb->is_runtime_stub ()) {
8484 return false ;
8585 }
8686 }
@@ -179,7 +179,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
179179 // because the return address counts against the callee's frame.
180180
181181 if (sender_blob->frame_size () <= 0 ) {
182- assert (!sender_blob->is_compiled (), " should count return address at least" );
182+ assert (!sender_blob->is_nmethod (), " should count return address at least" );
183183 return false ;
184184 }
185185
@@ -188,7 +188,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
188188 // should not be anything but the call stub (already covered), the interpreter (already covered)
189189 // or an nmethod.
190190
191- if (!sender_blob->is_compiled ()) {
191+ if (!sender_blob->is_nmethod ()) {
192192 return false ;
193193 }
194194
@@ -229,7 +229,7 @@ void frame::patch_pc(Thread* thread, address pc) {
229229 DEBUG_ONLY (address old_pc = _pc;)
230230 *pc_addr = pc;
231231 _pc = pc; // must be set before call to get_deopt_original_pc
232- address original_pc = CompiledMethod ::get_deopt_original_pc (this );
232+ address original_pc = nmethod ::get_deopt_original_pc (this );
233233 if (original_pc != nullptr ) {
234234 assert (original_pc == old_pc, " expected original PC to be stored before patching" );
235235 _deopt_state = is_deoptimized;
@@ -332,7 +332,7 @@ bool frame::upcall_stub_frame_is_first() const {
332332// given unextended SP. The unextended SP might also be the saved SP
333333// for MethodHandle call sites.
334334#ifdef ASSERT
335- void frame::verify_deopt_original_pc (CompiledMethod * nm, intptr_t * unextended_sp, bool is_method_handle_return) {
335+ void frame::verify_deopt_original_pc (nmethod * nm, intptr_t * unextended_sp, bool is_method_handle_return) {
336336 frame fr;
337337
338338 // This is ugly but it's better than to change {get,set}_original_pc
@@ -357,19 +357,19 @@ void frame::adjust_unextended_sp() {
357357 // simplest way to tell whether we are returning to such a call site
358358 // is as follows:
359359
360- CompiledMethod* sender_cm = (_cb == nullptr ) ? nullptr : _cb->as_compiled_method_or_null ();
361- if (sender_cm != nullptr ) {
360+ nmethod* sender_nm = (_cb == nullptr ) ? nullptr : _cb->as_nmethod_or_null ();
361+ if (sender_nm != nullptr ) {
362362 // If the sender PC is a deoptimization point, get the original
363363 // PC. For MethodHandle call site the unextended_sp is stored in
364364 // saved_fp.
365- if (sender_cm ->is_deopt_mh_entry (_pc)) {
366- DEBUG_ONLY (verify_deopt_mh_original_pc (sender_cm , _fp));
365+ if (sender_nm ->is_deopt_mh_entry (_pc)) {
366+ DEBUG_ONLY (verify_deopt_mh_original_pc (sender_nm , _fp));
367367 _unextended_sp = _fp;
368368 }
369- else if (sender_cm ->is_deopt_entry (_pc)) {
370- DEBUG_ONLY (verify_deopt_original_pc (sender_cm , _unextended_sp));
369+ else if (sender_nm ->is_deopt_entry (_pc)) {
370+ DEBUG_ONLY (verify_deopt_original_pc (sender_nm , _unextended_sp));
371371 }
372- else if (sender_cm ->is_method_handle_return (_pc)) {
372+ else if (sender_nm ->is_method_handle_return (_pc)) {
373373 _unextended_sp = _fp;
374374 }
375375 }
0 commit comments