Index: src/builtins/arm64/builtins-arm64.cc |
diff --git a/src/builtins/arm64/builtins-arm64.cc b/src/builtins/arm64/builtins-arm64.cc |
index 153ca2c0030a2dbafab297443c0c931bebe36097..2d7c55f651aa1f8072d748ea502d8d2eca6c8b23 100644 |
--- a/src/builtins/arm64/builtins-arm64.cc |
+++ b/src/builtins/arm64/builtins-arm64.cc |
@@ -1472,9 +1472,16 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
__ B(&gotta_call_runtime); |
__ Bind(&try_shared); |
- // Is the full code valid? |
__ Ldr(entry, |
FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
+ // Is the shared function marked for optimization? |
+ __ Ldrb(temp, |
+ FieldMemOperand( |
+ entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset)); |
+ __ TestAndBranchIfAnySet( |
+ temp, 1 << SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte, |
+ &gotta_call_runtime); |
+ // Is the full code valid? |
__ Ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
__ Ldr(x5, FieldMemOperand(entry, Code::kFlagsOffset)); |
__ and_(x5, x5, Operand(Code::KindField::kMask)); |