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

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

Issue 2242193002: [Interpreter] Avoid accessing Isolate from during bytecode generation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_sourceposition
Patch Set: Rebase 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 | « src/interpreter/handler-table-builder.cc ('k') | test/cctest/interpreter/test-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 #include "src/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include <fstream> 7 #include <fstream>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 #ifdef DEBUG 150 #ifdef DEBUG
151 if (info->parse_info() && FLAG_print_ast) { 151 if (info->parse_info() && FLAG_print_ast) {
152 OFStream os(stdout); 152 OFStream os(stdout);
153 os << "--- AST ---" << std::endl 153 os << "--- AST ---" << std::endl
154 << AstPrinter(info->isolate()).PrintProgram(info->literal()) << std::endl 154 << AstPrinter(info->isolate()).PrintProgram(info->literal()) << std::endl
155 << std::flush; 155 << std::flush;
156 } 156 }
157 #endif // DEBUG 157 #endif // DEBUG
158 158
159 BytecodeGenerator generator(info); 159 BytecodeGenerator generator(info);
160 Handle<BytecodeArray> bytecodes = generator.MakeBytecode(); 160 Handle<BytecodeArray> bytecodes = generator.MakeBytecode(info->isolate());
161 161
162 if (generator.HasStackOverflow()) return false; 162 if (generator.HasStackOverflow()) return false;
163 163
164 if (FLAG_print_bytecode) { 164 if (FLAG_print_bytecode) {
165 OFStream os(stdout); 165 OFStream os(stdout);
166 bytecodes->Print(os); 166 bytecodes->Print(os);
167 os << std::flush; 167 os << std::flush;
168 } 168 }
169 169
170 info->SetBytecodeArray(bytecodes); 170 info->SetBytecodeArray(bytecodes);
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2250 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2251 __ SmiTag(new_state)); 2251 __ SmiTag(new_state));
2252 __ SetAccumulator(old_state); 2252 __ SetAccumulator(old_state);
2253 2253
2254 __ Dispatch(); 2254 __ Dispatch();
2255 } 2255 }
2256 2256
2257 } // namespace interpreter 2257 } // namespace interpreter
2258 } // namespace internal 2258 } // namespace internal
2259 } // namespace v8 2259 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/handler-table-builder.cc ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698