提交 c17f76e1 编写于 作者: T twisti

7132180: JSR 292: C1 JVM crash with ClassValue/MethodHandle

Reviewed-by: never
上级 4fc92aab
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -3683,8 +3683,12 @@ bool GraphBuilder::for_method_handle_inline(ciMethod* callee) {
// Get the two MethodHandle inputs from the Phi.
Value op1 = phi->operand_at(0);
Value op2 = phi->operand_at(1);
ciMethodHandle* mh1 = op1->type()->as_ObjectType()->constant_value()->as_method_handle();
ciMethodHandle* mh2 = op2->type()->as_ObjectType()->constant_value()->as_method_handle();
ObjectType* op1type = op1->type()->as_ObjectType();
ObjectType* op2type = op2->type()->as_ObjectType();
if (op1type->is_constant() && op2type->is_constant()) {
ciMethodHandle* mh1 = op1type->constant_value()->as_method_handle();
ciMethodHandle* mh2 = op2type->constant_value()->as_method_handle();
// Set the callee to have access to the class and signature in
// the MethodHandleCompiler.
......@@ -3736,6 +3740,7 @@ bool GraphBuilder::for_method_handle_inline(ciMethod* callee) {
}
}
}
}
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册