846
847 // NOTE: set_bci (called from sync_jvms) might reset the reexecute bit to
848 // undefined if the bci is different. This is normal for Parse but it
849 // should not happen for LibraryCallKit because only one bci is processed.
850 assert(!is_LibraryCallKit() || (jvms()->should_reexecute() == should_reexecute),
851 "in LibraryCallKit the reexecute bit should not change");
852
853 // If we are guaranteed to throw, we can prune everything but the
854 // input to the current bytecode.
855 bool can_prune_locals = false;
856 uint stack_slots_not_pruned = 0;
857 int inputs = 0, depth = 0;
858 if (must_throw) {
859 assert(method() == youngest_jvms->method(), "sanity");
860 if (compute_stack_effects(inputs, depth)) {
861 can_prune_locals = true;
862 stack_slots_not_pruned = inputs;
863 }
864 }
865
866 if (env()->jvmti_can_access_local_variables()) {
867 // At any safepoint, this method can get breakpointed, which would
868 // then require an immediate deoptimization.
869 can_prune_locals = false; // do not prune locals
870 stack_slots_not_pruned = 0;
871 }
872
873 // do not scribble on the input jvms
874 JVMState* out_jvms = youngest_jvms->clone_deep(C);
875 call->set_jvms(out_jvms); // Start jvms list for call node
876
877 // For a known set of bytecodes, the interpreter should reexecute them if
878 // deoptimization happens. We set the reexecute state for them here
879 if (out_jvms->is_reexecute_undefined() && //don't change if already specified
880 should_reexecute_implied_by_bytecode(out_jvms, call->is_AllocateArray())) {
881 out_jvms->set_should_reexecute(true); //NOTE: youngest_jvms not changed
882 }
883
884 // Presize the call:
885 DEBUG_ONLY(uint non_debug_edges = call->req());
886 call->add_req_batch(top(), youngest_jvms->debug_depth());
|
846
847 // NOTE: set_bci (called from sync_jvms) might reset the reexecute bit to
848 // undefined if the bci is different. This is normal for Parse but it
849 // should not happen for LibraryCallKit because only one bci is processed.
850 assert(!is_LibraryCallKit() || (jvms()->should_reexecute() == should_reexecute),
851 "in LibraryCallKit the reexecute bit should not change");
852
853 // If we are guaranteed to throw, we can prune everything but the
854 // input to the current bytecode.
855 bool can_prune_locals = false;
856 uint stack_slots_not_pruned = 0;
857 int inputs = 0, depth = 0;
858 if (must_throw) {
859 assert(method() == youngest_jvms->method(), "sanity");
860 if (compute_stack_effects(inputs, depth)) {
861 can_prune_locals = true;
862 stack_slots_not_pruned = inputs;
863 }
864 }
865
866 if (env()->should_retain_local_variables()) {
867 // At any safepoint, this method can get breakpointed, which would
868 // then require an immediate deoptimization.
869 can_prune_locals = false; // do not prune locals
870 stack_slots_not_pruned = 0;
871 }
872
873 // do not scribble on the input jvms
874 JVMState* out_jvms = youngest_jvms->clone_deep(C);
875 call->set_jvms(out_jvms); // Start jvms list for call node
876
877 // For a known set of bytecodes, the interpreter should reexecute them if
878 // deoptimization happens. We set the reexecute state for them here
879 if (out_jvms->is_reexecute_undefined() && //don't change if already specified
880 should_reexecute_implied_by_bytecode(out_jvms, call->is_AllocateArray())) {
881 out_jvms->set_should_reexecute(true); //NOTE: youngest_jvms not changed
882 }
883
884 // Presize the call:
885 DEBUG_ONLY(uint non_debug_edges = call->req());
886 call->add_req_batch(top(), youngest_jvms->debug_depth());
|