Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: src/mips64/builtins-mips64.cc

Issue 1707133003: [Interpreter] Fix deopt when accumulator needs to be materialized. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments and add test Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 __ Daddu(a1, a1, Operand(Code::kHeaderSize - kHeapObjectTag)); 1172 __ Daddu(a1, a1, Operand(Code::kHeaderSize - kHeapObjectTag));
1173 __ Jump(a1); 1173 __ Jump(a1);
1174 } 1174 }
1175 1175
1176 1176
1177 static void Generate_InterpreterNotifyDeoptimizedHelper( 1177 static void Generate_InterpreterNotifyDeoptimizedHelper(
1178 MacroAssembler* masm, Deoptimizer::BailoutType type) { 1178 MacroAssembler* masm, Deoptimizer::BailoutType type) {
1179 // Enter an internal frame. 1179 // Enter an internal frame.
1180 { 1180 {
1181 FrameScope scope(masm, StackFrame::INTERNAL); 1181 FrameScope scope(masm, StackFrame::INTERNAL);
1182 __ push(kInterpreterAccumulatorRegister); // Save accumulator register.
1183 1182
1184 // Pass the deoptimization type to the runtime system. 1183 // Pass the deoptimization type to the runtime system.
1185 __ li(a1, Operand(Smi::FromInt(static_cast<int>(type)))); 1184 __ li(a1, Operand(Smi::FromInt(static_cast<int>(type))));
1186 __ push(a1); 1185 __ push(a1);
1187 __ CallRuntime(Runtime::kNotifyDeoptimized); 1186 __ CallRuntime(Runtime::kNotifyDeoptimized);
1188
1189 __ pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
1190 // Tear down internal frame. 1187 // Tear down internal frame.
1191 } 1188 }
1192 1189
1193 // Drop state (we don't use this for interpreter deopts). 1190 // Drop state (we don't use these for interpreter deopts) and and pop the
1191 // accumulator value into the accumulator register.
1194 __ Drop(1); 1192 __ Drop(1);
1193 __ Pop(kInterpreterAccumulatorRegister);
1195 1194
1196 // Enter the bytecode dispatch. 1195 // Enter the bytecode dispatch.
1197 Generate_EnterBytecodeDispatch(masm); 1196 Generate_EnterBytecodeDispatch(masm);
1198 } 1197 }
1199 1198
1200 1199
1201 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) { 1200 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) {
1202 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); 1201 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER);
1203 } 1202 }
1204 1203
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 } 2746 }
2748 } 2747 }
2749 2748
2750 2749
2751 #undef __ 2750 #undef __
2752 2751
2753 } // namespace internal 2752 } // namespace internal
2754 } // namespace v8 2753 } // namespace v8
2755 2754
2756 #endif // V8_TARGET_ARCH_MIPS64 2755 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698