| OLD | NEW |
| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 } | 190 } |
| 191 return SUCCEEDED; | 191 return SUCCEEDED; |
| 192 } | 192 } |
| 193 | 193 |
| 194 InterpreterCompilationJob::Status InterpreterCompilationJob::FinalizeJobImpl() { | 194 InterpreterCompilationJob::Status InterpreterCompilationJob::FinalizeJobImpl() { |
| 195 Handle<BytecodeArray> bytecodes = generator()->FinalizeBytecode(isolate()); | 195 Handle<BytecodeArray> bytecodes = generator()->FinalizeBytecode(isolate()); |
| 196 if (generator()->HasStackOverflow()) { | 196 if (generator()->HasStackOverflow()) { |
| 197 return FAILED; | 197 return FAILED; |
| 198 } | 198 } |
| 199 | 199 |
| 200 CodeGenerator::MakeCodePrologue(info(), "interpreter"); |
| 201 |
| 200 if (FLAG_print_bytecode) { | 202 if (FLAG_print_bytecode) { |
| 201 OFStream os(stdout); | 203 OFStream os(stdout); |
| 202 bytecodes->Print(os); | 204 bytecodes->Print(os); |
| 203 os << std::flush; | 205 os << std::flush; |
| 204 } | 206 } |
| 205 | 207 |
| 206 info()->SetBytecodeArray(bytecodes); | 208 info()->SetBytecodeArray(bytecodes); |
| 207 info()->SetCode(info()->isolate()->builtins()->InterpreterEntryTrampoline()); | 209 info()->SetCode(info()->isolate()->builtins()->InterpreterEntryTrampoline()); |
| 208 return SUCCEEDED; | 210 return SUCCEEDED; |
| 209 } | 211 } |
| (...skipping 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2637 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2639 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2638 __ SmiTag(new_state)); | 2640 __ SmiTag(new_state)); |
| 2639 __ SetAccumulator(old_state); | 2641 __ SetAccumulator(old_state); |
| 2640 | 2642 |
| 2641 __ Dispatch(); | 2643 __ Dispatch(); |
| 2642 } | 2644 } |
| 2643 | 2645 |
| 2644 } // namespace interpreter | 2646 } // namespace interpreter |
| 2645 } // namespace internal | 2647 } // namespace internal |
| 2646 } // namespace v8 | 2648 } // namespace v8 |
| OLD | NEW |