OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 __ Add(ip0, ip0, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1138 __ Add(ip0, ip0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1139 __ Jump(ip0); | 1139 __ Jump(ip0); |
1140 } | 1140 } |
1141 | 1141 |
1142 | 1142 |
1143 static void Generate_InterpreterNotifyDeoptimizedHelper( | 1143 static void Generate_InterpreterNotifyDeoptimizedHelper( |
1144 MacroAssembler* masm, Deoptimizer::BailoutType type) { | 1144 MacroAssembler* masm, Deoptimizer::BailoutType type) { |
1145 // Enter an internal frame. | 1145 // Enter an internal frame. |
1146 { | 1146 { |
1147 FrameScope scope(masm, StackFrame::INTERNAL); | 1147 FrameScope scope(masm, StackFrame::INTERNAL); |
1148 __ Push(kInterpreterAccumulatorRegister); // Save accumulator register. | |
1149 | 1148 |
1150 // Pass the deoptimization type to the runtime system. | 1149 // Pass the deoptimization type to the runtime system. |
1151 __ Mov(x1, Operand(Smi::FromInt(static_cast<int>(type)))); | 1150 __ Mov(x1, Operand(Smi::FromInt(static_cast<int>(type)))); |
1152 __ Push(x1); | 1151 __ Push(x1); |
1153 __ CallRuntime(Runtime::kNotifyDeoptimized); | 1152 __ CallRuntime(Runtime::kNotifyDeoptimized); |
1154 | |
1155 __ Pop(kInterpreterAccumulatorRegister); // Restore accumulator register. | |
1156 // Tear down internal frame. | 1153 // Tear down internal frame. |
1157 } | 1154 } |
1158 | 1155 |
1159 // Drop state (we don't use this for interpreter deopts). | 1156 // Drop state (we don't use these for interpreter deopts) and and pop the |
| 1157 // accumulator value into the accumulator register. |
1160 __ Drop(1); | 1158 __ Drop(1); |
| 1159 __ Pop(kInterpreterAccumulatorRegister); |
1161 | 1160 |
1162 // Enter the bytecode dispatch. | 1161 // Enter the bytecode dispatch. |
1163 Generate_EnterBytecodeDispatch(masm); | 1162 Generate_EnterBytecodeDispatch(masm); |
1164 } | 1163 } |
1165 | 1164 |
1166 | 1165 |
1167 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) { | 1166 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) { |
1168 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); | 1167 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); |
1169 } | 1168 } |
1170 | 1169 |
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2811 } | 2810 } |
2812 } | 2811 } |
2813 | 2812 |
2814 | 2813 |
2815 #undef __ | 2814 #undef __ |
2816 | 2815 |
2817 } // namespace internal | 2816 } // namespace internal |
2818 } // namespace v8 | 2817 } // namespace v8 |
2819 | 2818 |
2820 #endif // V8_TARGET_ARCH_ARM | 2819 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |