Index: src/builtins/arm/builtins-arm.cc |
diff --git a/src/builtins/arm/builtins-arm.cc b/src/builtins/arm/builtins-arm.cc |
index a2a1692eeeb0da3a0f58cc931f968a41e8e588ad..b739545996e3e206ce3eab1a24ccbb56cda843b9 100644 |
--- a/src/builtins/arm/builtins-arm.cc |
+++ b/src/builtins/arm/builtins-arm.cc |
@@ -1480,9 +1480,17 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
__ pop(closure); |
__ pop(new_target); |
__ pop(argument_count); |
- // Is the full code valid? |
__ ldr(entry, |
FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
+ // Is the shared function marked for optimization? |
+ __ ldrb(r5, |
+ FieldMemOperand( |
+ entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset)); |
+ __ tst( |
+ r5, |
+ Operand(1 << SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte)); |
+ __ b(eq, &gotta_call_runtime_no_stack); |
+ // Is the full code valid? |
__ ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
__ ldr(r5, FieldMemOperand(entry, Code::kFlagsOffset)); |
__ and_(r5, r5, Operand(Code::KindField::kMask)); |