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 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1347 | 1347 |
1348 __ push(argument_count); | 1348 __ push(argument_count); |
1349 __ push(new_target); | 1349 __ push(new_target); |
1350 __ push(closure); | 1350 __ push(closure); |
1351 | 1351 |
1352 __ ldr(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1352 __ ldr(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
1353 __ ldr(map, | 1353 __ ldr(map, |
1354 FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); | 1354 FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); |
1355 __ ldr(index, FieldMemOperand(map, FixedArray::kLengthOffset)); | 1355 __ ldr(index, FieldMemOperand(map, FixedArray::kLengthOffset)); |
1356 __ cmp(index, Operand(Smi::FromInt(2))); | 1356 __ cmp(index, Operand(Smi::FromInt(2))); |
1357 __ b(lt, &gotta_call_runtime); | 1357 __ b(lt, &try_shared); |
1358 | 1358 |
1359 // r3 : native context | 1359 // r3 : native context |
1360 // r2 : length / index | 1360 // r2 : length / index |
1361 // r0 : optimized code map | 1361 // r0 : optimized code map |
1362 // stack[0] : new target | 1362 // stack[0] : new target |
1363 // stack[4] : closure | 1363 // stack[4] : closure |
1364 Register native_context = r3; | 1364 Register native_context = r3; |
1365 __ ldr(native_context, NativeContextMemOperand()); | 1365 __ ldr(native_context, NativeContextMemOperand()); |
1366 | 1366 |
1367 __ bind(&loop_top); | 1367 __ bind(&loop_top); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1412 __ mov(closure, r5); | 1412 __ mov(closure, r5); |
1413 __ pop(new_target); | 1413 __ pop(new_target); |
1414 __ pop(argument_count); | 1414 __ pop(argument_count); |
1415 __ Jump(entry); | 1415 __ Jump(entry); |
1416 | 1416 |
1417 __ bind(&loop_bottom); | 1417 __ bind(&loop_bottom); |
1418 __ sub(index, index, Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); | 1418 __ sub(index, index, Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); |
1419 __ cmp(index, Operand(Smi::FromInt(1))); | 1419 __ cmp(index, Operand(Smi::FromInt(1))); |
1420 __ b(gt, &loop_top); | 1420 __ b(gt, &loop_top); |
1421 | 1421 |
1422 // We found no code. | 1422 // We found no code. Try the SharedFunctionInfo. |
1423 __ jmp(&gotta_call_runtime); | |
1424 | |
1425 __ bind(&try_shared); | 1423 __ bind(&try_shared); |
1426 __ pop(closure); | 1424 __ pop(closure); |
1427 __ pop(new_target); | 1425 __ pop(new_target); |
1428 __ pop(argument_count); | 1426 __ pop(argument_count); |
1429 __ ldr(entry, | 1427 __ ldr(entry, |
1430 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1428 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
1431 // Is the shared function marked for tier up? | 1429 // Is the shared function marked for tier up? |
1432 __ ldrb(r5, FieldMemOperand(entry, | 1430 __ ldrb(r5, FieldMemOperand(entry, |
1433 SharedFunctionInfo::kMarkedForTierUpByteOffset)); | 1431 SharedFunctionInfo::kMarkedForTierUpByteOffset)); |
1434 __ tst(r5, Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); | 1432 __ tst(r5, Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); |
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2878 __ bkpt(0); | 2876 __ bkpt(0); |
2879 } | 2877 } |
2880 } | 2878 } |
2881 | 2879 |
2882 #undef __ | 2880 #undef __ |
2883 | 2881 |
2884 } // namespace internal | 2882 } // namespace internal |
2885 } // namespace v8 | 2883 } // namespace v8 |
2886 | 2884 |
2887 #endif // V8_TARGET_ARCH_ARM | 2885 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |