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

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

Issue 1902013002: [Interpreter] Pass CompileInfo to BytecodeGenerator's constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/bytecode-generator.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 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 if (info->parse_info() && FLAG_print_ast) { 144 if (info->parse_info() && FLAG_print_ast) {
145 OFStream os(stdout); 145 OFStream os(stdout);
146 os << "--- AST ---" << std::endl 146 os << "--- AST ---" << std::endl
147 << AstPrinter(info->isolate()).PrintProgram(info->literal()) << std::endl 147 << AstPrinter(info->isolate()).PrintProgram(info->literal()) << std::endl
148 << std::flush; 148 << std::flush;
149 } 149 }
150 #endif // DEBUG 150 #endif // DEBUG
151 151
152 BytecodeGenerator generator(info->isolate(), info->zone()); 152 BytecodeGenerator generator(info);
153 Handle<BytecodeArray> bytecodes = generator.MakeBytecode(info); 153 Handle<BytecodeArray> bytecodes = generator.MakeBytecode();
154 154
155 if (generator.HasStackOverflow()) return false; 155 if (generator.HasStackOverflow()) return false;
156 156
157 if (FLAG_print_bytecode) { 157 if (FLAG_print_bytecode) {
158 OFStream os(stdout); 158 OFStream os(stdout);
159 bytecodes->Print(os); 159 bytecodes->Print(os);
160 os << std::flush; 160 os << std::flush;
161 } 161 }
162 162
163 info->SetBytecodeArray(bytecodes); 163 info->SetBytecodeArray(bytecodes);
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 // Illegal 1681 // Illegal
1682 // 1682 //
1683 // An invalid bytecode aborting execution if dispatched. 1683 // An invalid bytecode aborting execution if dispatched.
1684 void Interpreter::DoIllegal(InterpreterAssembler* assembler) { 1684 void Interpreter::DoIllegal(InterpreterAssembler* assembler) {
1685 __ Abort(kInvalidBytecode); 1685 __ Abort(kInvalidBytecode);
1686 } 1686 }
1687 1687
1688 } // namespace interpreter 1688 } // namespace interpreter
1689 } // namespace internal 1689 } // namespace internal
1690 } // namespace v8 1690 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698