Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 1329cd692f17c94d57492d33439e19649eb674c4..2b30bda79a80ab82481c98258f4b6cc7495ffdc3 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -600,8 +600,8 @@ CodeGenSelector::CodeGenTag CodeGenSelector::Select(FunctionLiteral* fun) { |
} |
if (scope->arguments() != NULL) { |
- if (FLAG_trace_bailout) PrintF("function uses 'arguments'\n"); |
- return NORMAL; |
+ // if (FLAG_trace_bailout) PrintF("function uses 'arguments'\n"); |
+ // return NORMAL; |
William Hesse
2009/11/12 09:56:49
Remove.
Lasse Reichstein
2009/11/13 08:54:37
Done.
|
} |
has_supported_syntax_ = true; |
@@ -792,21 +792,23 @@ void CodeGenSelector::VisitSlot(Slot* expr) { |
void CodeGenSelector::VisitVariableProxy(VariableProxy* expr) { |
Expression* rewrite = expr->var()->rewrite(); |
- // A rewrite of NULL indicates a global variable. |
+ // A rewrite of NULL indicates a global variable or explict arguments access. |
William Hesse
2009/11/12 09:56:49
Lie!
Lasse Reichstein
2009/11/13 08:54:37
Truthified.
|
if (rewrite != NULL) { |
// Non-global. |
Slot* slot = rewrite->AsSlot(); |
- if (slot == NULL) { |
- // This is a variable rewritten to an explicit property access |
- // on the arguments object. |
- BAILOUT("non-global/non-slot variable reference"); |
- } |
- |
- Slot::Type type = slot->type(); |
- // When LOOKUP slots are enabled, some currently dead code |
- // implementing unary typeof will become live. |
- if (type == Slot::LOOKUP) { |
- BAILOUT("Lookup slot"); |
+ if (slot != NULL) { |
+ Slot::Type type = slot->type(); |
+ // When LOOKUP slots are enabled, some currently dead code |
+ // implementing unary typeof will become live. |
+ if (type == Slot::LOOKUP) { |
+ BAILOUT("Lookup slot"); |
+ } |
+ } else { |
+ Property* property = rewrite->AsProperty(); |
William Hesse
2009/11/12 09:56:49
Put a comment, indicating what this code is for.
Lasse Reichstein
2009/11/13 08:54:37
Added
|
+ ASSERT_NOT_NULL(property); |
+ ASSERT_NE(Expression::kUninitialized, context_); |
+ Visit(property); |
+ property->set_context(context_); |
Kevin Millikin (Chromium)
2009/11/12 14:23:13
I'm surprised that this works.
For a variable in
|
} |
} |
} |