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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 // Check function data field is actually a BytecodeArray object. | 1022 // Check function data field is actually a BytecodeArray object. |
1023 if (FLAG_debug_code) { | 1023 if (FLAG_debug_code) { |
1024 __ SmiTst(kInterpreterBytecodeArrayRegister, t0); | 1024 __ SmiTst(kInterpreterBytecodeArrayRegister, t0); |
1025 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, t0, | 1025 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, t0, |
1026 Operand(zero_reg)); | 1026 Operand(zero_reg)); |
1027 __ GetObjectType(kInterpreterBytecodeArrayRegister, t0, t0); | 1027 __ GetObjectType(kInterpreterBytecodeArrayRegister, t0, t0); |
1028 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, t0, | 1028 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, t0, |
1029 Operand(BYTECODE_ARRAY_TYPE)); | 1029 Operand(BYTECODE_ARRAY_TYPE)); |
1030 } | 1030 } |
1031 | 1031 |
| 1032 // Reset code age. |
| 1033 DCHECK_EQ(0, BytecodeArray::kNoAgeBytecodeAge); |
| 1034 __ sb(zero_reg, FieldMemOperand(kInterpreterBytecodeArrayRegister, |
| 1035 BytecodeArray::kBytecodeAgeOffset)); |
| 1036 |
1032 // Load initial bytecode offset. | 1037 // Load initial bytecode offset. |
1033 __ li(kInterpreterBytecodeOffsetRegister, | 1038 __ li(kInterpreterBytecodeOffsetRegister, |
1034 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 1039 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
1035 | 1040 |
1036 // Push new.target, bytecode array and Smi tagged bytecode array offset. | 1041 // Push new.target, bytecode array and Smi tagged bytecode array offset. |
1037 __ SmiTag(t0, kInterpreterBytecodeOffsetRegister); | 1042 __ SmiTag(t0, kInterpreterBytecodeOffsetRegister); |
1038 __ Push(a3, kInterpreterBytecodeArrayRegister, t0); | 1043 __ Push(a3, kInterpreterBytecodeArrayRegister, t0); |
1039 | 1044 |
1040 // Allocate the local and temporary register file on the stack. | 1045 // Allocate the local and temporary register file on the stack. |
1041 { | 1046 { |
(...skipping 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2939 __ break_(0xCC); | 2944 __ break_(0xCC); |
2940 } | 2945 } |
2941 } | 2946 } |
2942 | 2947 |
2943 #undef __ | 2948 #undef __ |
2944 | 2949 |
2945 } // namespace internal | 2950 } // namespace internal |
2946 } // namespace v8 | 2951 } // namespace v8 |
2947 | 2952 |
2948 #endif // V8_TARGET_ARCH_MIPS | 2953 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |