| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 __ pop(closure); | 1435 __ pop(closure); |
| 1436 __ pop(new_target); | 1436 __ pop(new_target); |
| 1437 __ pop(argument_count); | 1437 __ pop(argument_count); |
| 1438 __ ldr(entry, | 1438 __ ldr(entry, |
| 1439 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1439 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
| 1440 // Is the shared function marked for tier up? | 1440 // Is the shared function marked for tier up? |
| 1441 __ ldrb(r5, FieldMemOperand(entry, | 1441 __ ldrb(r5, FieldMemOperand(entry, |
| 1442 SharedFunctionInfo::kMarkedForTierUpByteOffset)); | 1442 SharedFunctionInfo::kMarkedForTierUpByteOffset)); |
| 1443 __ tst(r5, Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); | 1443 __ tst(r5, Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); |
| 1444 __ b(ne, &gotta_call_runtime_no_stack); | 1444 __ b(ne, &gotta_call_runtime_no_stack); |
| 1445 // Is the full code valid? | 1445 |
| 1446 // If SFI points to anything other than CompileLazy, install that. |
| 1446 __ ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1447 __ ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
| 1447 __ ldr(r5, FieldMemOperand(entry, Code::kFlagsOffset)); | 1448 __ Move(r5, masm->CodeObject()); |
| 1448 __ and_(r5, r5, Operand(Code::KindField::kMask)); | 1449 __ cmp(entry, r5); |
| 1449 __ mov(r5, Operand(r5, LSR, Code::KindField::kShift)); | |
| 1450 __ cmp(r5, Operand(Code::BUILTIN)); | |
| 1451 __ b(eq, &gotta_call_runtime_no_stack); | 1450 __ b(eq, &gotta_call_runtime_no_stack); |
| 1452 // Yes, install the full code. | 1451 |
| 1452 // Install the SFI's code entry. |
| 1453 __ add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1453 __ add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 1454 __ str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); | 1454 __ str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); |
| 1455 __ RecordWriteCodeEntryField(closure, entry, r5); | 1455 __ RecordWriteCodeEntryField(closure, entry, r5); |
| 1456 __ Jump(entry); | 1456 __ Jump(entry); |
| 1457 | 1457 |
| 1458 __ bind(&gotta_call_runtime); | 1458 __ bind(&gotta_call_runtime); |
| 1459 __ pop(closure); | 1459 __ pop(closure); |
| 1460 __ pop(new_target); | 1460 __ pop(new_target); |
| 1461 __ pop(argument_count); | 1461 __ pop(argument_count); |
| 1462 __ bind(&gotta_call_runtime_no_stack); | 1462 __ bind(&gotta_call_runtime_no_stack); |
| (...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2887 __ bkpt(0); | 2887 __ bkpt(0); |
| 2888 } | 2888 } |
| 2889 } | 2889 } |
| 2890 | 2890 |
| 2891 #undef __ | 2891 #undef __ |
| 2892 | 2892 |
| 2893 } // namespace internal | 2893 } // namespace internal |
| 2894 } // namespace v8 | 2894 } // namespace v8 |
| 2895 | 2895 |
| 2896 #endif // V8_TARGET_ARCH_ARM | 2896 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |