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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 __ cmp(index, Operand(Smi::FromInt(1))); | 1473 __ cmp(index, Operand(Smi::FromInt(1))); |
1474 __ b(gt, &loop_top); | 1474 __ b(gt, &loop_top); |
1475 | 1475 |
1476 // We found neither literals nor code. | 1476 // We found neither literals nor code. |
1477 __ jmp(&gotta_call_runtime); | 1477 __ jmp(&gotta_call_runtime); |
1478 | 1478 |
1479 __ bind(&try_shared); | 1479 __ bind(&try_shared); |
1480 __ pop(closure); | 1480 __ pop(closure); |
1481 __ pop(new_target); | 1481 __ pop(new_target); |
1482 __ pop(argument_count); | 1482 __ pop(argument_count); |
1483 // Is the full code valid? | |
1484 __ ldr(entry, | 1483 __ ldr(entry, |
1485 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1484 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
| 1485 // Is the shared function marked for optimization? |
| 1486 __ ldrb(r5, |
| 1487 FieldMemOperand( |
| 1488 entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset)); |
| 1489 __ tst( |
| 1490 r5, |
| 1491 Operand(1 << SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte)); |
| 1492 __ b(eq, &gotta_call_runtime_no_stack); |
| 1493 // Is the full code valid? |
1486 __ ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1494 __ ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
1487 __ ldr(r5, FieldMemOperand(entry, Code::kFlagsOffset)); | 1495 __ ldr(r5, FieldMemOperand(entry, Code::kFlagsOffset)); |
1488 __ and_(r5, r5, Operand(Code::KindField::kMask)); | 1496 __ and_(r5, r5, Operand(Code::KindField::kMask)); |
1489 __ mov(r5, Operand(r5, LSR, Code::KindField::kShift)); | 1497 __ mov(r5, Operand(r5, LSR, Code::KindField::kShift)); |
1490 __ cmp(r5, Operand(Code::BUILTIN)); | 1498 __ cmp(r5, Operand(Code::BUILTIN)); |
1491 __ b(eq, &gotta_call_runtime_no_stack); | 1499 __ b(eq, &gotta_call_runtime_no_stack); |
1492 // Yes, install the full code. | 1500 // Yes, install the full code. |
1493 __ add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1501 __ add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1494 __ str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); | 1502 __ str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); |
1495 __ RecordWriteCodeEntryField(closure, entry, r5); | 1503 __ RecordWriteCodeEntryField(closure, entry, r5); |
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2907 __ bkpt(0); | 2915 __ bkpt(0); |
2908 } | 2916 } |
2909 } | 2917 } |
2910 | 2918 |
2911 #undef __ | 2919 #undef __ |
2912 | 2920 |
2913 } // namespace internal | 2921 } // namespace internal |
2914 } // namespace v8 | 2922 } // namespace v8 |
2915 | 2923 |
2916 #endif // V8_TARGET_ARCH_ARM | 2924 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |