diff options
author | twisti <none@none> | 2011-11-09 00:42:33 -0800 |
---|---|---|
committer | twisti <none@none> | 2011-11-09 00:42:33 -0800 |
commit | 220827e9e270370cfdb82f74b063e7dbb75fde69 (patch) | |
tree | ac74a4960c2750e76f28117923df8ab00cff6fda /src/share/vm/opto/callGenerator.cpp | |
parent | 881ff6342062e85f0b64106df1fa529922f09e8d (diff) |
7087727: JSR 292: C2 crash if ScavengeRootsInCode=2 when "static final" MethodHandle constants are in use
Reviewed-by: jrose, kvn, never
Diffstat (limited to 'src/share/vm/opto/callGenerator.cpp')
-rw-r--r-- | src/share/vm/opto/callGenerator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/share/vm/opto/callGenerator.cpp b/src/share/vm/opto/callGenerator.cpp index 150aa923d..5ac338322 100644 --- a/src/share/vm/opto/callGenerator.cpp +++ b/src/share/vm/opto/callGenerator.cpp @@ -775,15 +775,15 @@ JVMState* PredictedDynamicCallGenerator::generate(JVMState* jvms) { Node* bol = NULL; int bc = jvms->method()->java_code_at_bci(jvms->bci()); - if (bc == Bytecodes::_invokespecial) { - // This is the selectAlternative idiom for guardWithTest + if (bc != Bytecodes::_invokedynamic) { + // This is the selectAlternative idiom for guardWithTest or + // similar idioms. Node* receiver = kit.argument(0); // Check if the MethodHandle is the expected one Node* cmp = gvn.transform(new(kit.C, 3) CmpPNode(receiver, predicted_mh)); bol = gvn.transform(new(kit.C, 2) BoolNode(cmp, BoolTest::eq) ); } else { - assert(bc == Bytecodes::_invokedynamic, "must be"); // Get the constant pool cache from the caller class. ciMethod* caller_method = jvms->method(); ciBytecodeStream str(caller_method); |