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(); |