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

Side by Side Diff: src/interpreter/setup-interpreter-internal.cc

Issue 2869683004: [arm] Share constant pool entries in snapshot. (Closed)
Patch Set: Created 3 years, 7 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/heap/heap.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 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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/setup-interpreter.h" 5 #include "src/interpreter/setup-interpreter.h"
6 6
7 #include "src/handles-inl.h" 7 #include "src/handles-inl.h"
8 #include "src/interpreter/bytecodes.h" 8 #include "src/interpreter/bytecodes.h"
9 #include "src/interpreter/interpreter-generator.h" 9 #include "src/interpreter/interpreter-generator.h"
10 #include "src/interpreter/interpreter.h" 10 #include "src/interpreter/interpreter.h"
11 #include "src/objects-inl.h" 11 #include "src/objects-inl.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 namespace interpreter { 15 namespace interpreter {
16 16
17 // static 17 // static
18 void SetupInterpreter::InstallBytecodeHandlers(Interpreter* interpreter) { 18 void SetupInterpreter::InstallBytecodeHandlers(Interpreter* interpreter) {
19 DCHECK(!interpreter->IsDispatchTableInitialized()); 19 DCHECK(!interpreter->IsDispatchTableInitialized());
20 HandleScope scope(interpreter->isolate_); 20 HandleScope scope(interpreter->isolate_);
21 CanonicalHandleScope canonical(interpreter->isolate_);
rmcilroy 2017/05/16 09:04:05 Why is this needed? Could you add a comment please
21 Address* dispatch_table = interpreter->dispatch_table_; 22 Address* dispatch_table = interpreter->dispatch_table_;
22 23
23 // Generate bytecode handlers for all bytecodes and scales. 24 // Generate bytecode handlers for all bytecodes and scales.
24 const OperandScale kOperandScales[] = { 25 const OperandScale kOperandScales[] = {
25 #define VALUE(Name, _) OperandScale::k##Name, 26 #define VALUE(Name, _) OperandScale::k##Name,
26 OPERAND_SCALE_LIST(VALUE) 27 OPERAND_SCALE_LIST(VALUE)
27 #undef VALUE 28 #undef VALUE
28 }; 29 };
29 30
30 for (OperandScale operand_scale : kOperandScales) { 31 for (OperandScale operand_scale : kOperandScales) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (ReuseExistingHandler(dispatch_table, bytecode, operand_scale)) return; 83 if (ReuseExistingHandler(dispatch_table, bytecode, operand_scale)) return;
83 84
84 size_t index = Interpreter::GetDispatchTableIndex(bytecode, operand_scale); 85 size_t index = Interpreter::GetDispatchTableIndex(bytecode, operand_scale);
85 Handle<Code> code = GenerateBytecodeHandler(isolate, bytecode, operand_scale); 86 Handle<Code> code = GenerateBytecodeHandler(isolate, bytecode, operand_scale);
86 dispatch_table[index] = code->entry(); 87 dispatch_table[index] = code->entry();
87 } 88 }
88 89
89 } // namespace interpreter 90 } // namespace interpreter
90 } // namespace internal 91 } // namespace internal
91 } // namespace v8 92 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698