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

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

Issue 2487173002: [turbofan] Advance bytecode offset after lazy deopt. (Closed)
Patch Set: Properly restore context. Created 4 years, 1 month 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/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 __ TailCallStub(&stub); 1289 __ TailCallStub(&stub);
1290 1290
1291 __ bind(&stack_overflow); 1291 __ bind(&stack_overflow);
1292 { 1292 {
1293 __ TailCallRuntime(Runtime::kThrowStackOverflow); 1293 __ TailCallRuntime(Runtime::kThrowStackOverflow);
1294 // Unreachable code. 1294 // Unreachable code.
1295 __ break_(0xCC); 1295 __ break_(0xCC);
1296 } 1296 }
1297 } 1297 }
1298 1298
1299 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { 1299 static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
1300 // Set the return address to the correct point in the interpreter entry 1300 // Set the return address to the correct point in the interpreter entry
1301 // trampoline. 1301 // trampoline.
1302 Smi* interpreter_entry_return_pc_offset( 1302 Smi* interpreter_entry_return_pc_offset(
1303 masm->isolate()->heap()->interpreter_entry_return_pc_offset()); 1303 masm->isolate()->heap()->interpreter_entry_return_pc_offset());
1304 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::kZero); 1304 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::kZero);
1305 __ li(t0, Operand(masm->isolate()->builtins()->InterpreterEntryTrampoline())); 1305 __ li(t0, Operand(masm->isolate()->builtins()->InterpreterEntryTrampoline()));
1306 __ Addu(ra, t0, Operand(interpreter_entry_return_pc_offset->value() + 1306 __ Addu(ra, t0, Operand(interpreter_entry_return_pc_offset->value() +
1307 Code::kHeaderSize - kHeapObjectTag)); 1307 Code::kHeaderSize - kHeapObjectTag));
1308 1308
1309 // Initialize the dispatch table register. 1309 // Initialize the dispatch table register.
(...skipping 22 matching lines...) Expand all
1332 1332
1333 // Dispatch to the target bytecode. 1333 // Dispatch to the target bytecode.
1334 __ Addu(a1, kInterpreterBytecodeArrayRegister, 1334 __ Addu(a1, kInterpreterBytecodeArrayRegister,
1335 kInterpreterBytecodeOffsetRegister); 1335 kInterpreterBytecodeOffsetRegister);
1336 __ lbu(a1, MemOperand(a1)); 1336 __ lbu(a1, MemOperand(a1));
1337 __ Lsa(a1, kInterpreterDispatchTableRegister, a1, kPointerSizeLog2); 1337 __ Lsa(a1, kInterpreterDispatchTableRegister, a1, kPointerSizeLog2);
1338 __ lw(a1, MemOperand(a1)); 1338 __ lw(a1, MemOperand(a1));
1339 __ Jump(a1); 1339 __ Jump(a1);
1340 } 1340 }
1341 1341
1342 void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
1343 // Advance the current bytecode offset stored within the given interpreter
1344 // stack frame. This simulates what all bytecode handlers do upon completion
1345 // of the underlying operation.
1346 __ lw(a1, MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
1347 __ lw(a2, MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
1348 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
1349 {
1350 FrameScope scope(masm, StackFrame::INTERNAL);
1351 __ Push(kInterpreterAccumulatorRegister, a1, a2);
1352 __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset);
1353 __ mov(a2, v0); // Result is the new bytecode offset.
1354 __ Pop(kInterpreterAccumulatorRegister);
1355 }
1356 __ sw(a2, MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
1357
1358 Generate_InterpreterEnterBytecode(masm);
1359 }
1360
1361 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
1362 Generate_InterpreterEnterBytecode(masm);
1363 }
1364
1342 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { 1365 void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
1343 // ----------- S t a t e ------------- 1366 // ----------- S t a t e -------------
1344 // -- a0 : argument count (preserved for callee) 1367 // -- a0 : argument count (preserved for callee)
1345 // -- a3 : new target (preserved for callee) 1368 // -- a3 : new target (preserved for callee)
1346 // -- a1 : target function (preserved for callee) 1369 // -- a1 : target function (preserved for callee)
1347 // ----------------------------------- 1370 // -----------------------------------
1348 // First lookup code, maybe we don't need to compile! 1371 // First lookup code, maybe we don't need to compile!
1349 Label gotta_call_runtime, gotta_call_runtime_no_stack; 1372 Label gotta_call_runtime, gotta_call_runtime_no_stack;
1350 Label try_shared; 1373 Label try_shared;
1351 Label loop_top, loop_bottom; 1374 Label loop_top, loop_bottom;
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2963 __ break_(0xCC); 2986 __ break_(0xCC);
2964 } 2987 }
2965 } 2988 }
2966 2989
2967 #undef __ 2990 #undef __
2968 2991
2969 } // namespace internal 2992 } // namespace internal
2970 } // namespace v8 2993 } // namespace v8
2971 2994
2972 #endif // V8_TARGET_ARCH_MIPS 2995 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698