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

Unified Diff: src/hydrogen.cc

Issue 6534022: Optimize functions needing a local context.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698