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

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

Issue 1721983005: [Interpreter] Handles stack overflow in interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed comments. 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/bytecode-generator.cc ('k') | test/mjsunit/mjsunit.status » ('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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 OFStream os(stdout); 83 OFStream os(stdout);
84 os << "--- AST ---" << std::endl 84 os << "--- AST ---" << std::endl
85 << AstPrinter(info->isolate()).PrintProgram(info->literal()) << std::endl 85 << AstPrinter(info->isolate()).PrintProgram(info->literal()) << std::endl
86 << std::flush; 86 << std::flush;
87 } 87 }
88 #endif // DEBUG 88 #endif // DEBUG
89 89
90 BytecodeGenerator generator(info->isolate(), info->zone()); 90 BytecodeGenerator generator(info->isolate(), info->zone());
91 info->EnsureFeedbackVector(); 91 info->EnsureFeedbackVector();
92 Handle<BytecodeArray> bytecodes = generator.MakeBytecode(info); 92 Handle<BytecodeArray> bytecodes = generator.MakeBytecode(info);
93
94 if (generator.HasStackOverflow()) return false;
95
93 if (FLAG_print_bytecode) { 96 if (FLAG_print_bytecode) {
94 OFStream os(stdout); 97 OFStream os(stdout);
95 bytecodes->Print(os); 98 bytecodes->Print(os);
96 os << std::flush; 99 os << std::flush;
97 } 100 }
98 101
99 info->SetBytecodeArray(bytecodes); 102 info->SetBytecodeArray(bytecodes);
100 info->SetCode(info->isolate()->builtins()->InterpreterEntryTrampoline()); 103 info->SetCode(info->isolate()->builtins()->InterpreterEntryTrampoline());
101 return true; 104 return true;
102 } 105 }
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1835 Node* index = __ LoadRegister(index_reg); 1838 Node* index = __ LoadRegister(index_reg);
1836 Node* context = __ GetContext(); 1839 Node* context = __ GetContext();
1837 Node* result = __ CallRuntime(Runtime::kForInStep, context, index); 1840 Node* result = __ CallRuntime(Runtime::kForInStep, context, index);
1838 __ SetAccumulator(result); 1841 __ SetAccumulator(result);
1839 __ Dispatch(); 1842 __ Dispatch();
1840 } 1843 }
1841 1844
1842 } // namespace interpreter 1845 } // namespace interpreter
1843 } // namespace internal 1846 } // namespace internal
1844 } // namespace v8 1847 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698