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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 1721983005: [Interpreter] Handles stack overflow in interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: disabled the check to see if result is available on stack overflow. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index a92aca9ade80aaa8c9bd159b1731311e09e7d1d2..2c6ebcb18bc4ec63251d98f57b9720fe93c4eda5 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -455,7 +455,7 @@ class BytecodeGenerator::ExpressionResultScope {
virtual ~ExpressionResultScope() {
generator_->set_execution_result(outer_);
- DCHECK(result_identified());
+ if (!generator_->HasStackOverflow()) DCHECK(result_identified());
mythria 2016/02/24 11:49:39 when there is a stack overflow, we don't visit any
oth 2016/02/24 13:19:47 All the logic could go in the DCHECK(result_identi
mythria 2016/02/24 13:32:14 Done.
}
bool IsEffect() const { return kind_ == Expression::kEffect; }
@@ -1282,7 +1282,10 @@ void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
// Find or build a shared function info.
Handle<SharedFunctionInfo> shared_info =
Compiler::GetSharedFunctionInfo(expr, info()->script(), info());
- CHECK(!shared_info.is_null()); // TODO(rmcilroy): Set stack overflow?
+ if (shared_info.is_null()) {
+ execution_result()->SetResultInAccumulator();
+ return SetStackOverflow();
+ }
builder()->CreateClosure(shared_info,
expr->pretenure() ? TENURED : NOT_TENURED);
execution_result()->SetResultInAccumulator();
« no previous file with comments | « no previous file | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698