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.cc

Issue 2061623002: Introduce JIT code events dispatcher for the isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebaseline Created 4 years, 6 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/ic/handler-compiler.cc ('k') | src/isolate.h » ('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 #include "src/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include <fstream> 7 #include <fstream>
8 8
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #define GENERATE_CODE(Name, ...) \ 55 #define GENERATE_CODE(Name, ...) \
56 { \ 56 { \
57 if (Bytecodes::BytecodeHasHandler(Bytecode::k##Name, operand_scale)) { \ 57 if (Bytecodes::BytecodeHasHandler(Bytecode::k##Name, operand_scale)) { \
58 InterpreterAssembler assembler(isolate_, &zone, Bytecode::k##Name, \ 58 InterpreterAssembler assembler(isolate_, &zone, Bytecode::k##Name, \
59 operand_scale); \ 59 operand_scale); \
60 Do##Name(&assembler); \ 60 Do##Name(&assembler); \
61 Handle<Code> code = assembler.GenerateCode(); \ 61 Handle<Code> code = assembler.GenerateCode(); \
62 size_t index = GetDispatchTableIndex(Bytecode::k##Name, operand_scale); \ 62 size_t index = GetDispatchTableIndex(Bytecode::k##Name, operand_scale); \
63 dispatch_table_[index] = code->entry(); \ 63 dispatch_table_[index] = code->entry(); \
64 TraceCodegen(code); \ 64 TraceCodegen(code); \
65 LOG_CODE_EVENT( \ 65 PROFILE( \
66 isolate_, \ 66 isolate_, \
67 CodeCreateEvent( \ 67 CodeCreateEvent( \
68 Logger::BYTECODE_HANDLER_TAG, AbstractCode::cast(*code), \ 68 CodeEventListener::BYTECODE_HANDLER_TAG, \
69 AbstractCode::cast(*code), \
69 Bytecodes::ToString(Bytecode::k##Name, operand_scale).c_str())); \ 70 Bytecodes::ToString(Bytecode::k##Name, operand_scale).c_str())); \
70 } \ 71 } \
71 } 72 }
72 BYTECODE_LIST(GENERATE_CODE) 73 BYTECODE_LIST(GENERATE_CODE)
73 #undef GENERATE_CODE 74 #undef GENERATE_CODE
74 } 75 }
75 76
76 // Fill unused entries will the illegal bytecode handler. 77 // Fill unused entries will the illegal bytecode handler.
77 size_t illegal_index = 78 size_t illegal_index =
78 GetDispatchTableIndex(Bytecode::kIllegal, OperandScale::kSingle); 79 GetDispatchTableIndex(Bytecode::kIllegal, OperandScale::kSingle);
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 1844 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
1844 __ SmiTag(new_state)); 1845 __ SmiTag(new_state));
1845 __ SetAccumulator(old_state); 1846 __ SetAccumulator(old_state);
1846 1847
1847 __ Dispatch(); 1848 __ Dispatch();
1848 } 1849 }
1849 1850
1850 } // namespace interpreter 1851 } // namespace interpreter
1851 } // namespace internal 1852 } // namespace internal
1852 } // namespace v8 1853 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698