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

Side by Side Diff: src/mips/builtins-mips.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/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.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_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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 __ Addu(a1, a1, Operand(Code::kHeaderSize - kHeapObjectTag)); 1180 __ Addu(a1, a1, Operand(Code::kHeaderSize - kHeapObjectTag));
1181 __ Jump(a1); 1181 __ Jump(a1);
1182 } 1182 }
1183 1183
1184 1184
1185 static void Generate_InterpreterNotifyDeoptimizedHelper( 1185 static void Generate_InterpreterNotifyDeoptimizedHelper(
1186 MacroAssembler* masm, Deoptimizer::BailoutType type) { 1186 MacroAssembler* masm, Deoptimizer::BailoutType type) {
1187 // Enter an internal frame. 1187 // Enter an internal frame.
1188 { 1188 {
1189 FrameScope scope(masm, StackFrame::INTERNAL); 1189 FrameScope scope(masm, StackFrame::INTERNAL);
1190 __ push(kInterpreterAccumulatorRegister); // Save accumulator register.
1191 1190
1192 // Pass the deoptimization type to the runtime system. 1191 // Pass the deoptimization type to the runtime system.
1193 __ li(a1, Operand(Smi::FromInt(static_cast<int>(type)))); 1192 __ li(a1, Operand(Smi::FromInt(static_cast<int>(type))));
1194 __ push(a1); 1193 __ push(a1);
1195 __ CallRuntime(Runtime::kNotifyDeoptimized); 1194 __ CallRuntime(Runtime::kNotifyDeoptimized);
1196
1197 __ pop(kInterpreterAccumulatorRegister); // Restore accumulator register.
1198 // Tear down internal frame. 1195 // Tear down internal frame.
1199 } 1196 }
1200 1197
1201 // Drop state (we don't use this for interpreter deopts). 1198 // Drop state (we don't use these for interpreter deopts) and and pop the
1199 // accumulator value into the accumulator register.
1202 __ Drop(1); 1200 __ Drop(1);
1201 __ Pop(kInterpreterAccumulatorRegister);
1203 1202
1204 // Enter the bytecode dispatch. 1203 // Enter the bytecode dispatch.
1205 Generate_EnterBytecodeDispatch(masm); 1204 Generate_EnterBytecodeDispatch(masm);
1206 } 1205 }
1207 1206
1208 1207
1209 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) { 1208 void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) {
1210 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); 1209 Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER);
1211 } 1210 }
1212 1211
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
2753 } 2752 }
2754 } 2753 }
2755 2754
2756 2755
2757 #undef __ 2756 #undef __
2758 2757
2759 } // namespace internal 2758 } // namespace internal
2760 } // namespace v8 2759 } // namespace v8
2761 2760
2762 #endif // V8_TARGET_ARCH_MIPS 2761 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698