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

Side by Side Diff: src/interpreter/interpreter-assembler.cc

Issue 2576213007: [interpreter] Avoid allocation of temporary array of Nodes when generating dispatch to bytecode han… (Closed)
Patch Set: Created 4 years 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/compiler/raw-machine-assembler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include "src/interpreter/interpreter-assembler.h" 5 #include "src/interpreter/interpreter-assembler.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 // TODO(ishell): Add CSA::CodeEntryPoint(code). 1002 // TODO(ishell): Add CSA::CodeEntryPoint(code).
1003 Node* handler_entry = 1003 Node* handler_entry =
1004 IntPtrAdd(BitcastTaggedToWord(handler), 1004 IntPtrAdd(BitcastTaggedToWord(handler),
1005 IntPtrConstant(Code::kHeaderSize - kHeapObjectTag)); 1005 IntPtrConstant(Code::kHeaderSize - kHeapObjectTag));
1006 return DispatchToBytecodeHandlerEntry(handler_entry, bytecode_offset); 1006 return DispatchToBytecodeHandlerEntry(handler_entry, bytecode_offset);
1007 } 1007 }
1008 1008
1009 Node* InterpreterAssembler::DispatchToBytecodeHandlerEntry( 1009 Node* InterpreterAssembler::DispatchToBytecodeHandlerEntry(
1010 Node* handler_entry, Node* bytecode_offset) { 1010 Node* handler_entry, Node* bytecode_offset) {
1011 InterpreterDispatchDescriptor descriptor(isolate()); 1011 InterpreterDispatchDescriptor descriptor(isolate());
1012 Node* args[] = {GetAccumulatorUnchecked(), bytecode_offset, 1012 return TailCallBytecodeDispatch(
1013 BytecodeArrayTaggedPointer(), DispatchTableRawPointer()}; 1013 descriptor, handler_entry, GetAccumulatorUnchecked(), bytecode_offset,
1014 return TailCallBytecodeDispatch(descriptor, handler_entry, args); 1014 BytecodeArrayTaggedPointer(), DispatchTableRawPointer());
1015 } 1015 }
1016 1016
1017 void InterpreterAssembler::DispatchWide(OperandScale operand_scale) { 1017 void InterpreterAssembler::DispatchWide(OperandScale operand_scale) {
1018 // Dispatching a wide bytecode requires treating the prefix 1018 // Dispatching a wide bytecode requires treating the prefix
1019 // bytecode a base pointer into the dispatch table and dispatching 1019 // bytecode a base pointer into the dispatch table and dispatching
1020 // the bytecode that follows relative to this base. 1020 // the bytecode that follows relative to this base.
1021 // 1021 //
1022 // Indices 0-255 correspond to bytecodes with operand_scale == 0 1022 // Indices 0-255 correspond to bytecodes with operand_scale == 0
1023 // Indices 256-511 correspond to bytecodes with operand_scale == 1 1023 // Indices 256-511 correspond to bytecodes with operand_scale == 1
1024 // Indices 512-767 correspond to bytecodes with operand_scale == 2 1024 // Indices 512-767 correspond to bytecodes with operand_scale == 2
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 Goto(&loop); 1301 Goto(&loop);
1302 } 1302 }
1303 Bind(&done_loop); 1303 Bind(&done_loop);
1304 1304
1305 return array; 1305 return array;
1306 } 1306 }
1307 1307
1308 } // namespace interpreter 1308 } // namespace interpreter
1309 } // namespace internal 1309 } // namespace internal
1310 } // namespace v8 1310 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698