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

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

Issue 1671813003: [interpreter] move the dispatch table off heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix verify heap 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 | « no previous file | src/arm64/builtins-arm64.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_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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 // - Allow simulator stop operations if FLAG_stop_at is set. 1042 // - Allow simulator stop operations if FLAG_stop_at is set.
1043 // - Code aging of the BytecodeArray object. 1043 // - Code aging of the BytecodeArray object.
1044 1044
1045 // Load accumulator, register file, bytecode offset, dispatch table into 1045 // Load accumulator, register file, bytecode offset, dispatch table into
1046 // registers. 1046 // registers.
1047 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); 1047 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
1048 __ add(kInterpreterRegisterFileRegister, fp, 1048 __ add(kInterpreterRegisterFileRegister, fp,
1049 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); 1049 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp));
1050 __ mov(kInterpreterBytecodeOffsetRegister, 1050 __ mov(kInterpreterBytecodeOffsetRegister,
1051 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); 1051 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag));
1052 __ LoadRoot(kInterpreterDispatchTableRegister, 1052 __ mov(kInterpreterDispatchTableRegister,
1053 Heap::kInterpreterTableRootIndex); 1053 Operand(ExternalReference::interpreter_dispatch_table_address(
1054 __ add(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister, 1054 masm->isolate())));
1055 Operand(FixedArray::kHeaderSize - kHeapObjectTag));
1056 1055
1057 // Dispatch to the first bytecode handler for the function. 1056 // Dispatch to the first bytecode handler for the function.
1058 __ ldrb(r1, MemOperand(kInterpreterBytecodeArrayRegister, 1057 __ ldrb(r1, MemOperand(kInterpreterBytecodeArrayRegister,
1059 kInterpreterBytecodeOffsetRegister)); 1058 kInterpreterBytecodeOffsetRegister));
1060 __ ldr(ip, MemOperand(kInterpreterDispatchTableRegister, r1, LSL, 1059 __ ldr(ip, MemOperand(kInterpreterDispatchTableRegister, r1, LSL,
1061 kPointerSizeLog2)); 1060 kPointerSizeLog2));
1062 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging 1061 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging
1063 // and header removal. 1062 // and header removal.
1064 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); 1063 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag));
1065 __ Call(ip); 1064 __ Call(ip);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 1146
1148 // Call the constructor with r0, r1, and r3 unmodified. 1147 // Call the constructor with r0, r1, and r3 unmodified.
1149 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); 1148 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET);
1150 } 1149 }
1151 1150
1152 1151
1153 static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) { 1152 static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) {
1154 // Initialize register file register and dispatch table register. 1153 // Initialize register file register and dispatch table register.
1155 __ add(kInterpreterRegisterFileRegister, fp, 1154 __ add(kInterpreterRegisterFileRegister, fp,
1156 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); 1155 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp));
1157 __ LoadRoot(kInterpreterDispatchTableRegister, 1156 __ mov(kInterpreterDispatchTableRegister,
1158 Heap::kInterpreterTableRootIndex); 1157 Operand(ExternalReference::interpreter_dispatch_table_address(
1159 __ add(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister, 1158 masm->isolate())));
1160 Operand(FixedArray::kHeaderSize - kHeapObjectTag));
1161 1159
1162 // Get the context from the frame. 1160 // Get the context from the frame.
1163 __ ldr(kContextRegister, 1161 __ ldr(kContextRegister,
1164 MemOperand(kInterpreterRegisterFileRegister, 1162 MemOperand(kInterpreterRegisterFileRegister,
1165 InterpreterFrameConstants::kContextFromRegisterPointer)); 1163 InterpreterFrameConstants::kContextFromRegisterPointer));
1166 1164
1167 // Get the bytecode array pointer from the frame. 1165 // Get the bytecode array pointer from the frame.
1168 __ ldr(r1, 1166 __ ldr(r1,
1169 MemOperand(kInterpreterRegisterFileRegister, 1167 MemOperand(kInterpreterRegisterFileRegister,
1170 InterpreterFrameConstants::kFunctionFromRegisterPointer)); 1168 InterpreterFrameConstants::kFunctionFromRegisterPointer));
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
2688 } 2686 }
2689 } 2687 }
2690 2688
2691 2689
2692 #undef __ 2690 #undef __
2693 2691
2694 } // namespace internal 2692 } // namespace internal
2695 } // namespace v8 2693 } // namespace v8
2696 2694
2697 #endif // V8_TARGET_ARCH_ARM 2695 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698