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

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

Issue 1707693003: [Interpreter] Enable runtime profiler support for Ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Really fix --debug-code Created 4 years, 10 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/interpreter/interpreter.h ('k') | src/interpreter/interpreter-assembler.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 "src/ast/prettyprinter.h" 7 #include "src/ast/prettyprinter.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 BYTECODE_LIST(GENERATE_CODE) 43 BYTECODE_LIST(GENERATE_CODE)
44 #undef GENERATE_CODE 44 #undef GENERATE_CODE
45 } 45 }
46 46
47 void Interpreter::IterateDispatchTable(ObjectVisitor* v) { 47 void Interpreter::IterateDispatchTable(ObjectVisitor* v) {
48 v->VisitPointers(&dispatch_table_[0], 48 v->VisitPointers(&dispatch_table_[0],
49 &dispatch_table_[0] + kDispatchTableSize); 49 &dispatch_table_[0] + kDispatchTableSize);
50 } 50 }
51 51
52 // static
53 int Interpreter::InterruptBudget() {
54 // TODO(ignition): Tune code size multiplier.
55 const int kCodeSizeMultiplier = 32;
56 return FLAG_interrupt_budget * kCodeSizeMultiplier;
57 }
58
52 bool Interpreter::MakeBytecode(CompilationInfo* info) { 59 bool Interpreter::MakeBytecode(CompilationInfo* info) {
53 if (FLAG_print_bytecode || FLAG_print_source || FLAG_print_ast) { 60 if (FLAG_print_bytecode || FLAG_print_source || FLAG_print_ast) {
54 OFStream os(stdout); 61 OFStream os(stdout);
55 base::SmartArrayPointer<char> name = info->GetDebugName(); 62 base::SmartArrayPointer<char> name = info->GetDebugName();
56 os << "[generating bytecode for function: " << info->GetDebugName().get() 63 os << "[generating bytecode for function: " << info->GetDebugName().get()
57 << "]" << std::endl 64 << "]" << std::endl
58 << std::flush; 65 << std::flush;
59 } 66 }
60 67
61 #ifdef DEBUG 68 #ifdef DEBUG
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 Node* index = __ LoadRegister(index_reg); 1818 Node* index = __ LoadRegister(index_reg);
1812 Node* context = __ GetContext(); 1819 Node* context = __ GetContext();
1813 Node* result = __ CallRuntime(Runtime::kForInStep, context, index); 1820 Node* result = __ CallRuntime(Runtime::kForInStep, context, index);
1814 __ SetAccumulator(result); 1821 __ SetAccumulator(result);
1815 __ Dispatch(); 1822 __ Dispatch();
1816 } 1823 }
1817 1824
1818 } // namespace interpreter 1825 } // namespace interpreter
1819 } // namespace internal 1826 } // namespace internal
1820 } // namespace v8 1827 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/interpreter.h ('k') | src/interpreter/interpreter-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698