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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1472 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); | 1472 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); |
1473 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1))); | 1473 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1))); |
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)); |
| 1483 // Is the shared function marked for optimization? |
| 1484 __ lbu(t1, |
| 1485 FieldMemOperand( |
| 1486 entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset)); |
| 1487 __ And( |
| 1488 t1, t1, |
| 1489 Operand(1 << SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte)); |
| 1490 __ Branch(&gotta_call_runtime_no_stack, ne, t1, Operand(zero_reg)); |
1482 // Is the full code valid? | 1491 // Is the full code valid? |
1483 __ lw(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | |
1484 __ lw(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1492 __ lw(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
1485 __ lw(t1, FieldMemOperand(entry, Code::kFlagsOffset)); | 1493 __ lw(t1, FieldMemOperand(entry, Code::kFlagsOffset)); |
1486 __ And(t1, t1, Operand(Code::KindField::kMask)); | 1494 __ And(t1, t1, Operand(Code::KindField::kMask)); |
1487 __ srl(t1, t1, Code::KindField::kShift); | 1495 __ srl(t1, t1, Code::KindField::kShift); |
1488 __ Branch(&gotta_call_runtime_no_stack, eq, t1, Operand(Code::BUILTIN)); | 1496 __ Branch(&gotta_call_runtime_no_stack, eq, t1, Operand(Code::BUILTIN)); |
1489 // Yes, install the full code. | 1497 // Yes, install the full code. |
1490 __ Addu(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1498 __ Addu(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1491 __ sw(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); | 1499 __ sw(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); |
1492 __ RecordWriteCodeEntryField(closure, entry, t1); | 1500 __ RecordWriteCodeEntryField(closure, entry, t1); |
1493 __ Jump(entry); | 1501 __ Jump(entry); |
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2982 __ break_(0xCC); | 2990 __ break_(0xCC); |
2983 } | 2991 } |
2984 } | 2992 } |
2985 | 2993 |
2986 #undef __ | 2994 #undef __ |
2987 | 2995 |
2988 } // namespace internal | 2996 } // namespace internal |
2989 } // namespace v8 | 2997 } // namespace v8 |
2990 | 2998 |
2991 #endif // V8_TARGET_ARCH_MIPS | 2999 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |