Index: src/hydrogen.cc |
=================================================================== |
--- src/hydrogen.cc (revision 6859) |
+++ src/hydrogen.cc (working copy) |
@@ -2292,9 +2292,6 @@ |
// We don't yet handle the function name for named function expressions. |
if (scope->function() != NULL) BAILOUT("named function expression"); |
- // We can't handle heap-allocated locals. |
- if (scope->num_heap_slots() > 0) BAILOUT("heap allocated locals"); |
- |
HConstant* undefined_constant = |
new HConstant(Factory::undefined_value(), Representation::Tagged()); |
AddInstruction(undefined_constant); |
@@ -2316,6 +2313,10 @@ |
// Handle the arguments and arguments shadow variables specially (they do |
// not have declarations). |
if (scope->arguments() != NULL) { |
+ if (!scope->arguments()->IsStackAllocated() || |
+ !scope->arguments_shadow()->IsStackAllocated()) { |
+ BAILOUT("context-allocated arguments"); |
+ } |
HArgumentsObject* object = new HArgumentsObject; |
AddInstruction(object); |
graph()->SetArgumentsObject(object); |
@@ -4023,6 +4024,7 @@ |
} |
return false; |
} |
+ if (inner_info.scope()->num_heap_slots() > 0) return false; |
FunctionLiteral* function = inner_info.function(); |
// Count the number of AST nodes added by inlining this call. |