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

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

Issue 1882073002: [Interpreter] Make dispatch table point to code entry instead of code objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix visiting dispatch table. Created 4 years, 8 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/interpreter/interpreter-assembler.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 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 __ li(kInterpreterDispatchTableRegister, 1023 __ li(kInterpreterDispatchTableRegister,
1024 Operand(ExternalReference::interpreter_dispatch_table_address( 1024 Operand(ExternalReference::interpreter_dispatch_table_address(
1025 masm->isolate()))); 1025 masm->isolate())));
1026 1026
1027 // Dispatch to the first bytecode handler for the function. 1027 // Dispatch to the first bytecode handler for the function.
1028 __ Addu(a0, kInterpreterBytecodeArrayRegister, 1028 __ Addu(a0, kInterpreterBytecodeArrayRegister,
1029 kInterpreterBytecodeOffsetRegister); 1029 kInterpreterBytecodeOffsetRegister);
1030 __ lbu(a0, MemOperand(a0)); 1030 __ lbu(a0, MemOperand(a0));
1031 __ Lsa(at, kInterpreterDispatchTableRegister, a0, kPointerSizeLog2); 1031 __ Lsa(at, kInterpreterDispatchTableRegister, a0, kPointerSizeLog2);
1032 __ lw(at, MemOperand(at)); 1032 __ lw(at, MemOperand(at));
1033 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging
1034 // and header removal.
1035 __ Addu(at, at, Operand(Code::kHeaderSize - kHeapObjectTag));
1036 __ Call(at); 1033 __ Call(at);
1037 1034
1038 // Even though the first bytecode handler was called, we will never return. 1035 // Even though the first bytecode handler was called, we will never return.
1039 __ Abort(kUnexpectedReturnFromBytecodeHandler); 1036 __ Abort(kUnexpectedReturnFromBytecodeHandler);
1040 1037
1041 // Load debug copy of the bytecode array. 1038 // Load debug copy of the bytecode array.
1042 __ bind(&load_debug_bytecode_array); 1039 __ bind(&load_debug_bytecode_array);
1043 __ lw(kInterpreterBytecodeArrayRegister, 1040 __ lw(kInterpreterBytecodeArrayRegister,
1044 FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex)); 1041 FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex));
1045 __ Branch(&bytecode_array_loaded); 1042 __ Branch(&bytecode_array_loaded);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 kInterpreterRegisterFileRegister, 1162 kInterpreterRegisterFileRegister,
1166 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer)); 1163 InterpreterFrameConstants::kBytecodeOffsetFromRegisterPointer));
1167 __ SmiUntag(kInterpreterBytecodeOffsetRegister); 1164 __ SmiUntag(kInterpreterBytecodeOffsetRegister);
1168 1165
1169 // Dispatch to the target bytecode. 1166 // Dispatch to the target bytecode.
1170 __ Addu(a1, kInterpreterBytecodeArrayRegister, 1167 __ Addu(a1, kInterpreterBytecodeArrayRegister,
1171 kInterpreterBytecodeOffsetRegister); 1168 kInterpreterBytecodeOffsetRegister);
1172 __ lbu(a1, MemOperand(a1)); 1169 __ lbu(a1, MemOperand(a1));
1173 __ Lsa(a1, kInterpreterDispatchTableRegister, a1, kPointerSizeLog2); 1170 __ Lsa(a1, kInterpreterDispatchTableRegister, a1, kPointerSizeLog2);
1174 __ lw(a1, MemOperand(a1)); 1171 __ lw(a1, MemOperand(a1));
1175 __ Addu(a1, a1, Operand(Code::kHeaderSize - kHeapObjectTag));
1176 __ Jump(a1); 1172 __ Jump(a1);
1177 } 1173 }
1178 1174
1179 1175
1180 static void Generate_InterpreterNotifyDeoptimizedHelper( 1176 static void Generate_InterpreterNotifyDeoptimizedHelper(
1181 MacroAssembler* masm, Deoptimizer::BailoutType type) { 1177 MacroAssembler* masm, Deoptimizer::BailoutType type) {
1182 // Enter an internal frame. 1178 // Enter an internal frame.
1183 { 1179 {
1184 FrameScope scope(masm, StackFrame::INTERNAL); 1180 FrameScope scope(masm, StackFrame::INTERNAL);
1185 1181
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
2708 } 2704 }
2709 } 2705 }
2710 2706
2711 2707
2712 #undef __ 2708 #undef __
2713 2709
2714 } // namespace internal 2710 } // namespace internal
2715 } // namespace v8 2711 } // namespace v8
2716 2712
2717 #endif // V8_TARGET_ARCH_MIPS 2713 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/interpreter/interpreter-assembler.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698