Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index a92aca9ade80aaa8c9bd159b1731311e09e7d1d2..b5c29139a1de385287ebf0115690fb86693b4153 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()); |
+ DCHECK(result_identified() || generator_->HasStackOverflow()); |
} |
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(); |
rmcilroy
2016/02/24 16:09:30
Do you need the SetResultInAccumulator now? I don'
|
+ return SetStackOverflow(); |
+ } |
builder()->CreateClosure(shared_info, |
expr->pretenure() ? TENURED : NOT_TENURED); |
execution_result()->SetResultInAccumulator(); |