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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, | 1361 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, |
1362 &gotta_call_runtime_no_stack); | 1362 &gotta_call_runtime_no_stack); |
1363 | 1363 |
1364 __ push(argument_count); | 1364 __ push(argument_count); |
1365 __ push(new_target); | 1365 __ push(new_target); |
1366 __ push(closure); | 1366 __ push(closure); |
1367 | 1367 |
1368 __ lw(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1368 __ lw(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
1369 __ lw(map, FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); | 1369 __ lw(map, FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); |
1370 __ lw(index, FieldMemOperand(map, FixedArray::kLengthOffset)); | 1370 __ lw(index, FieldMemOperand(map, FixedArray::kLengthOffset)); |
1371 __ Branch(&try_shared, lt, index, Operand(Smi::FromInt(2))); | 1371 __ Branch(&gotta_call_runtime, lt, index, Operand(Smi::FromInt(2))); |
1372 | 1372 |
1373 // a3 : native context | 1373 // a3 : native context |
1374 // a2 : length / index | 1374 // a2 : length / index |
1375 // a0 : optimized code map | 1375 // a0 : optimized code map |
1376 // stack[0] : new target | 1376 // stack[0] : new target |
1377 // stack[4] : closure | 1377 // stack[4] : closure |
1378 Register native_context = a3; | 1378 Register native_context = a3; |
1379 __ lw(native_context, NativeContextMemOperand()); | 1379 __ lw(native_context, NativeContextMemOperand()); |
1380 | 1380 |
1381 __ bind(&loop_top); | 1381 __ bind(&loop_top); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 __ mov(closure, t1); | 1426 __ mov(closure, t1); |
1427 __ pop(new_target); | 1427 __ pop(new_target); |
1428 __ pop(argument_count); | 1428 __ pop(argument_count); |
1429 __ Jump(entry); | 1429 __ Jump(entry); |
1430 | 1430 |
1431 __ bind(&loop_bottom); | 1431 __ bind(&loop_bottom); |
1432 __ Subu(index, index, | 1432 __ Subu(index, index, |
1433 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); | 1433 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); |
1434 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1))); | 1434 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1))); |
1435 | 1435 |
1436 // We found no code. Try the SharedFunctionInfo. | 1436 // We found no code. |
| 1437 __ jmp(&gotta_call_runtime); |
| 1438 |
1437 __ bind(&try_shared); | 1439 __ bind(&try_shared); |
1438 __ pop(closure); | 1440 __ pop(closure); |
1439 __ pop(new_target); | 1441 __ pop(new_target); |
1440 __ pop(argument_count); | 1442 __ pop(argument_count); |
1441 __ lw(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1443 __ lw(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
1442 // Is the shared function marked for tier up? | 1444 // Is the shared function marked for tier up? |
1443 __ lbu(t1, FieldMemOperand(entry, | 1445 __ lbu(t1, FieldMemOperand(entry, |
1444 SharedFunctionInfo::kMarkedForTierUpByteOffset)); | 1446 SharedFunctionInfo::kMarkedForTierUpByteOffset)); |
1445 __ And(t1, t1, | 1447 __ And(t1, t1, |
1446 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); | 1448 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); |
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3096 __ break_(0xCC); | 3098 __ break_(0xCC); |
3097 } | 3099 } |
3098 } | 3100 } |
3099 | 3101 |
3100 #undef __ | 3102 #undef __ |
3101 | 3103 |
3102 } // namespace internal | 3104 } // namespace internal |
3103 } // namespace v8 | 3105 } // namespace v8 |
3104 | 3106 |
3105 #endif // V8_TARGET_ARCH_MIPS | 3107 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |