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

Unified Diff: src/parser.cc

Issue 19199002: Fix sloppy-mode 'const' under Harmony flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | test/mjsunit/regress/regress-173361.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index ca2d022f0ec50b161d3e9f8686ccba9854bc160e..b0626733deed1abda0a1fd0f58aaa57e35870fe9 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1563,24 +1563,18 @@ void Parser::Declare(Declaration* declaration, bool resolve, bool* ok) {
// For global const variables we bind the proxy to a variable.
ASSERT(resolve); // should be set by all callers
Variable::Kind kind = Variable::NORMAL;
- var = new(zone()) Variable(declaration_scope,
- name,
- mode,
- true,
- kind,
- kNeedsInitialization);
+ var = new(zone()) Variable(
+ declaration_scope, name, mode, true, kind,
+ kNeedsInitialization, proxy->interface());
} else if (declaration_scope->is_eval_scope() &&
declaration_scope->is_classic_mode()) {
// For variable declarations in a non-strict eval scope the proxy is bound
// to a lookup variable to force a dynamic declaration using the
// DeclareContextSlot runtime function.
Variable::Kind kind = Variable::NORMAL;
- var = new(zone()) Variable(declaration_scope,
- name,
- mode,
- true,
- kind,
- declaration->initialization());
+ var = new(zone()) Variable(
+ declaration_scope, name, mode, true, kind,
+ declaration->initialization(), proxy->interface());
var->AllocateTo(Variable::LOOKUP, -1);
resolve = true;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-173361.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698