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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1193 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1194 __ mov(pc, ip); | 1194 __ mov(pc, ip); |
1195 } | 1195 } |
1196 | 1196 |
1197 | 1197 |
1198 static void Generate_InterpreterNotifyDeoptimizedHelper( | 1198 static void Generate_InterpreterNotifyDeoptimizedHelper( |
1199 MacroAssembler* masm, Deoptimizer::BailoutType type) { | 1199 MacroAssembler* masm, Deoptimizer::BailoutType type) { |
1200 // Enter an internal frame. | 1200 // Enter an internal frame. |
1201 { | 1201 { |
1202 FrameScope scope(masm, StackFrame::INTERNAL); | 1202 FrameScope scope(masm, StackFrame::INTERNAL); |
1203 __ push(kInterpreterAccumulatorRegister); // Save accumulator register. | |
1204 | 1203 |
1205 // Pass the deoptimization type to the runtime system. | 1204 // Pass the deoptimization type to the runtime system. |
1206 __ mov(r1, Operand(Smi::FromInt(static_cast<int>(type)))); | 1205 __ mov(r1, Operand(Smi::FromInt(static_cast<int>(type)))); |
1207 __ push(r1); | 1206 __ push(r1); |
1208 __ CallRuntime(Runtime::kNotifyDeoptimized); | 1207 __ CallRuntime(Runtime::kNotifyDeoptimized); |
1209 | |
1210 __ pop(kInterpreterAccumulatorRegister); // Restore accumulator register. | |
1211 // Tear down internal frame. | 1208 // Tear down internal frame. |
1212 } | 1209 } |
1213 | 1210 |
1214 // Drop state (we don't use this for interpreter deopts). | 1211 // Drop state (we don't use these for interpreter deopts) and and pop the |
| 1212 // accumulator value into the accumulator register. |
1215 __ Drop(1); | 1213 __ Drop(1); |
| 1214 __ Pop(kInterpreterAccumulatorRegister); |
1216 | 1215 |
1217 // Enter the bytecode dispatch. | 1216 // Enter the bytecode dispatch. |
1218 Generate_EnterBytecodeDispatch(masm); | 1217 Generate_EnterBytecodeDispatch(masm); |
1219 } | 1218 } |
1220 | 1219 |
1221 | 1220 |
1222 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) { | 1221 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) { |
1223 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); | 1222 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); |
1224 } | 1223 } |
1225 | 1224 |
(...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2678 } | 2677 } |
2679 } | 2678 } |
2680 | 2679 |
2681 | 2680 |
2682 #undef __ | 2681 #undef __ |
2683 | 2682 |
2684 } // namespace internal | 2683 } // namespace internal |
2685 } // namespace v8 | 2684 } // namespace v8 |
2686 | 2685 |
2687 #endif // V8_TARGET_ARCH_ARM | 2686 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |