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

Unified Diff: src/compiler.cc

Issue 305005: Added support for assignments to global variables in the toplevel code... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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
Index: src/compiler.cc
===================================================================
--- src/compiler.cc (revision 3091)
+++ src/compiler.cc (working copy)
@@ -649,12 +649,14 @@
}
Variable* var = expr->target()->AsVariableProxy()->AsVariable();
- if (var == NULL || var->is_global()) BAILOUT("non-variable assignment");
+ if (var == NULL) BAILOUT("non-variable assignment");
- ASSERT(var->slot() != NULL);
- Slot::Type type = var->slot()->type();
- if (type != Slot::PARAMETER && type != Slot::LOCAL) {
- BAILOUT("non-parameter/non-local slot assignment");
+ if (!var->is_global()) {
+ ASSERT(var->slot() != NULL);
+ Slot::Type type = var->slot()->type();
+ if (type != Slot::PARAMETER && type != Slot::LOCAL) {
+ BAILOUT("non-parameter/non-local slot assignment");
+ }
}
Visit(expr->value());

Powered by Google App Engine
This is Rietveld 408576698