Mercurial > hg > truffle
changeset 4062:83d0b5cd1438
7087727: JSR 292: C2 crash if ScavengeRootsInCode=2 when "static final" MethodHandle constants are in use
Reviewed-by: jrose, kvn, never
author | twisti |
---|---|
date | Wed, 09 Nov 2011 00:42:33 -0800 |
parents | e3e363b2bf19 |
children | 7e0e43cf86d6 |
files | src/share/vm/opto/callGenerator.cpp |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/opto/callGenerator.cpp Tue Nov 08 20:42:26 2011 -0800 +++ b/src/share/vm/opto/callGenerator.cpp Wed Nov 09 00:42:33 2011 -0800 @@ -775,15 +775,15 @@ 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);