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

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

Issue 2869683004: [arm] Share constant pool entries in snapshot. (Closed)
Patch Set: Update tools/v8heapconst.py 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
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 // Canonicalize handles, so that we can share constant pool entries pointing
22 // to code targets without dereferencing their handles.
23 CanonicalHandleScope canonical(interpreter->isolate_);
21 Address* dispatch_table = interpreter->dispatch_table_; 24 Address* dispatch_table = interpreter->dispatch_table_;
22 25
23 // Generate bytecode handlers for all bytecodes and scales. 26 // Generate bytecode handlers for all bytecodes and scales.
24 const OperandScale kOperandScales[] = { 27 const OperandScale kOperandScales[] = {
25 #define VALUE(Name, _) OperandScale::k##Name, 28 #define VALUE(Name, _) OperandScale::k##Name,
26 OPERAND_SCALE_LIST(VALUE) 29 OPERAND_SCALE_LIST(VALUE)
27 #undef VALUE 30 #undef VALUE
28 }; 31 };
29 32
30 for (OperandScale operand_scale : kOperandScales) { 33 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; 85 if (ReuseExistingHandler(dispatch_table, bytecode, operand_scale)) return;
83 86
84 size_t index = Interpreter::GetDispatchTableIndex(bytecode, operand_scale); 87 size_t index = Interpreter::GetDispatchTableIndex(bytecode, operand_scale);
85 Handle<Code> code = GenerateBytecodeHandler(isolate, bytecode, operand_scale); 88 Handle<Code> code = GenerateBytecodeHandler(isolate, bytecode, operand_scale);
86 dispatch_table[index] = code->entry(); 89 dispatch_table[index] = code->entry();
87 } 90 }
88 91
89 } // namespace interpreter 92 } // namespace interpreter
90 } // namespace internal 93 } // namespace internal
91 } // namespace v8 94 } // namespace v8
OLDNEW
« src/disassembler.cc ('K') | « src/heap/heap.cc ('k') | tools/v8heapconst.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698