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 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 | 1474 |
1475 // We found neither literals nor code. | 1475 // We found neither literals nor code. |
1476 __ jmp(&gotta_call_runtime); | 1476 __ jmp(&gotta_call_runtime); |
1477 | 1477 |
1478 __ bind(&try_shared); | 1478 __ bind(&try_shared); |
1479 __ pop(closure); | 1479 __ pop(closure); |
1480 __ pop(new_target); | 1480 __ pop(new_target); |
1481 __ pop(argument_count); | 1481 __ pop(argument_count); |
1482 __ lw(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1482 __ lw(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
1483 // Is the shared function marked for optimization? | 1483 // Is the shared function marked for optimization? |
1484 __ lbu(t1, | 1484 __ lbu(t1, FieldMemOperand( |
1485 FieldMemOperand( | 1485 entry, SharedFunctionInfo::kWasMarkedForTierUpByteOffset)); |
1486 entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset)); | 1486 __ And(t1, t1, |
1487 __ And( | 1487 Operand(1 << SharedFunctionInfo::kWasMarkedForTierUpBitWithinByte)); |
1488 t1, t1, | |
1489 Operand(1 << SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte)); | |
1490 __ Branch(&gotta_call_runtime_no_stack, ne, t1, Operand(zero_reg)); | 1488 __ Branch(&gotta_call_runtime_no_stack, ne, t1, Operand(zero_reg)); |
1491 // Is the full code valid? | 1489 // Is the full code valid? |
1492 __ lw(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1490 __ lw(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
1493 __ lw(t1, FieldMemOperand(entry, Code::kFlagsOffset)); | 1491 __ lw(t1, FieldMemOperand(entry, Code::kFlagsOffset)); |
1494 __ And(t1, t1, Operand(Code::KindField::kMask)); | 1492 __ And(t1, t1, Operand(Code::KindField::kMask)); |
1495 __ srl(t1, t1, Code::KindField::kShift); | 1493 __ srl(t1, t1, Code::KindField::kShift); |
1496 __ Branch(&gotta_call_runtime_no_stack, eq, t1, Operand(Code::BUILTIN)); | 1494 __ Branch(&gotta_call_runtime_no_stack, eq, t1, Operand(Code::BUILTIN)); |
1497 // Yes, install the full code. | 1495 // Yes, install the full code. |
1498 __ Addu(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1496 __ Addu(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1499 __ sw(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); | 1497 __ sw(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); |
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2990 __ break_(0xCC); | 2988 __ break_(0xCC); |
2991 } | 2989 } |
2992 } | 2990 } |
2993 | 2991 |
2994 #undef __ | 2992 #undef __ |
2995 | 2993 |
2996 } // namespace internal | 2994 } // namespace internal |
2997 } // namespace v8 | 2995 } // namespace v8 |
2998 | 2996 |
2999 #endif // V8_TARGET_ARCH_MIPS | 2997 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |