src/share/vm/code/nmethod.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6893081 Cdiff src/share/vm/code/nmethod.cpp
src/share/vm/code/nmethod.cpp
Print this page
rev 1024 : imported patch indy-cleanup-6893081.patch
*** 1752,1761 ****
--- 1752,1769 ----
}
assert(prev_offset == PcDesc::upper_offset_limit,
"must end with a sentinel");
#endif //ASSERT
+ // Search for MethodHandle invokes and tag the nmethod.
+ for (int i = 0; i < count; i++) {
+ if (pcs[i].is_method_handle_invoke()) {
+ set_has_method_handle_invokes(true);
+ break;
+ }
+ }
+
int size = count * sizeof(PcDesc);
assert(scopes_pcs_size() >= size, "oob");
memcpy(scopes_pcs_begin(), pcs, size);
// Adjust the final sentinel downward.
*** 2019,2028 ****
--- 2027,2048 ----
return ret;
}
// -----------------------------------------------------------------------------
+ // MethodHandle
+
+ bool nmethod::is_method_handle_return(address return_pc) {
+ if (!has_method_handle_invokes()) return false;
+ PcDesc* pd = pc_desc_at(return_pc);
+ if (pd == NULL)
+ return false;
+ return pd->is_method_handle_invoke();
+ }
+
+
+ // -----------------------------------------------------------------------------
// Verification
class VerifyOopsClosure: public OopClosure {
nmethod* _nm;
bool _ok;
src/share/vm/code/nmethod.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File