| Index: src/builtins/arm/builtins-arm.cc
|
| diff --git a/src/builtins/arm/builtins-arm.cc b/src/builtins/arm/builtins-arm.cc
|
| index 49a344846f9f481259437924edc7f483a1df50d2..69ab451727a12b617a113e82f4236f7231c3b82c 100644
|
| --- a/src/builtins/arm/builtins-arm.cc
|
| +++ b/src/builtins/arm/builtins-arm.cc
|
| @@ -1370,6 +1370,7 @@
|
| // -----------------------------------
|
| // First lookup code, maybe we don't need to compile!
|
| Label gotta_call_runtime, gotta_call_runtime_no_stack;
|
| + Label maybe_call_runtime;
|
| Label try_shared;
|
| Label loop_top, loop_bottom;
|
|
|
| @@ -1436,12 +1437,15 @@
|
| FieldMemOperand(array_pointer,
|
| SharedFunctionInfo::kOffsetToPreviousCachedCode));
|
| __ ldr(entry, FieldMemOperand(entry, WeakCell::kValueOffset));
|
| - __ JumpIfSmi(entry, &try_shared);
|
| + __ JumpIfSmi(entry, &maybe_call_runtime);
|
|
|
| // Found literals and code. Get them into the closure and return.
|
| __ pop(closure);
|
| // Store code entry in the closure.
|
| __ add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag));
|
| +
|
| + Label install_optimized_code_and_tailcall;
|
| + __ bind(&install_optimized_code_and_tailcall);
|
| __ str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset));
|
| __ RecordWriteCodeEntryField(closure, entry, r5);
|
|
|
| @@ -1476,8 +1480,20 @@
|
| // We found neither literals nor code.
|
| __ jmp(&gotta_call_runtime);
|
|
|
| + __ bind(&maybe_call_runtime);
|
| + __ pop(closure);
|
| +
|
| + // Last possibility. Check the context free optimized code map entry.
|
| + __ ldr(entry, FieldMemOperand(map, FixedArray::kHeaderSize +
|
| + SharedFunctionInfo::kSharedCodeIndex));
|
| + __ ldr(entry, FieldMemOperand(entry, WeakCell::kValueOffset));
|
| + __ JumpIfSmi(entry, &try_shared);
|
| +
|
| + // Store code entry in the closure.
|
| + __ add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag));
|
| + __ jmp(&install_optimized_code_and_tailcall);
|
| +
|
| __ bind(&try_shared);
|
| - __ pop(closure);
|
| __ pop(new_target);
|
| __ pop(argument_count);
|
| // Is the full code valid?
|
|
|