提交 370fb4a4 编写于 作者: V vlivanov

8059455: LambdaForm.prepare() does unnecessary work for cached LambdaForms

Reviewed-by: psandoz
上级 d34216d2
...@@ -631,7 +631,7 @@ class LambdaForm { ...@@ -631,7 +631,7 @@ class LambdaForm {
* as a sort of pre-invocation linkage step.) * as a sort of pre-invocation linkage step.)
*/ */
public void prepare() { public void prepare() {
if (COMPILE_THRESHOLD == 0) { if (COMPILE_THRESHOLD == 0 && !isCompiled) {
compileToBytecode(); compileToBytecode();
} }
if (this.vmentry != null) { if (this.vmentry != null) {
...@@ -645,11 +645,11 @@ class LambdaForm { ...@@ -645,11 +645,11 @@ class LambdaForm {
/** Generate optimizable bytecode for this form. */ /** Generate optimizable bytecode for this form. */
MemberName compileToBytecode() { MemberName compileToBytecode() {
MethodType invokerType = methodType();
assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType));
if (vmentry != null && isCompiled) { if (vmentry != null && isCompiled) {
return vmentry; // already compiled somehow return vmentry; // already compiled somehow
} }
MethodType invokerType = methodType();
assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType));
try { try {
vmentry = InvokerBytecodeGenerator.generateCustomizedCode(this, invokerType); vmentry = InvokerBytecodeGenerator.generateCustomizedCode(this, invokerType);
if (TRACE_INTERPRETER) if (TRACE_INTERPRETER)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册