Index: src/builtins/ppc/builtins-ppc.cc |
diff --git a/src/builtins/ppc/builtins-ppc.cc b/src/builtins/ppc/builtins-ppc.cc |
index 9caabec0a10800f1ef9e3d3618872c1c58857604..6e6ce4341e2587d1876bbceba8201650d9f47dc6 100644 |
--- a/src/builtins/ppc/builtins-ppc.cc |
+++ b/src/builtins/ppc/builtins-ppc.cc |
@@ -1500,9 +1500,16 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
__ b(&gotta_call_runtime); |
__ bind(&try_shared); |
- // Is the full code valid? |
__ LoadP(entry, |
FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
+ // Is the shared function marked for optimization? |
+ __ lbz(r8, |
+ FieldMemOperand( |
+ entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset)); |
+ __ TestBit(r8, SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte, |
+ r0); |
+ __ beq(&gotta_call_runtime); |
+ // Is the full code valid? |
__ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
__ lwz(r8, FieldMemOperand(entry, Code::kFlagsOffset)); |
__ DecodeField<Code::KindField>(r8); |