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

Side by Side Diff: src/interpreter/interpreter.h

Issue 2182183005: [interpreter] Support on-stack replacement in profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 4 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/interpreter/interpreter.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 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 #ifndef V8_INTERPRETER_INTERPRETER_H_ 5 #ifndef V8_INTERPRETER_INTERPRETER_H_
6 #define V8_INTERPRETER_INTERPRETER_H_ 6 #define V8_INTERPRETER_INTERPRETER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 // Clients of this interface shouldn't depend on lots of interpreter internals. 10 // Clients of this interface shouldn't depend on lots of interpreter internals.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 Local<v8::Object> GetDispatchCountersObject(); 58 Local<v8::Object> GetDispatchCountersObject();
59 59
60 Address dispatch_table_address() { 60 Address dispatch_table_address() {
61 return reinterpret_cast<Address>(&dispatch_table_[0]); 61 return reinterpret_cast<Address>(&dispatch_table_[0]);
62 } 62 }
63 63
64 Address bytecode_dispatch_counters_table() { 64 Address bytecode_dispatch_counters_table() {
65 return reinterpret_cast<Address>(bytecode_dispatch_counters_table_.get()); 65 return reinterpret_cast<Address>(bytecode_dispatch_counters_table_.get());
66 } 66 }
67 67
68 // TODO(ignition): Tune code size multiplier.
69 static const int kCodeSizeMultiplier = 32;
70
68 private: 71 private:
69 // Bytecode handler generator functions. 72 // Bytecode handler generator functions.
70 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ 73 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \
71 void Do##Name(InterpreterAssembler* assembler); 74 void Do##Name(InterpreterAssembler* assembler);
72 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) 75 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR)
73 #undef DECLARE_BYTECODE_HANDLER_GENERATOR 76 #undef DECLARE_BYTECODE_HANDLER_GENERATOR
74 77
75 // Generates code to perform the binary operation via |Generator|. 78 // Generates code to perform the binary operation via |Generator|.
76 template <class Generator> 79 template <class Generator>
77 void DoBinaryOp(InterpreterAssembler* assembler); 80 void DoBinaryOp(InterpreterAssembler* assembler);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; 179 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_;
177 180
178 DISALLOW_COPY_AND_ASSIGN(Interpreter); 181 DISALLOW_COPY_AND_ASSIGN(Interpreter);
179 }; 182 };
180 183
181 } // namespace interpreter 184 } // namespace interpreter
182 } // namespace internal 185 } // namespace internal
183 } // namespace v8 186 } // namespace v8
184 187
185 #endif // V8_INTERPRETER_INTERPRETER_H_ 188 #endif // V8_INTERPRETER_INTERPRETER_H_
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698