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

Side by Side Diff: src/parser.cc

Issue 1410023004: Merged: Squashed multiple commits. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.7
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/property-details.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/parser.h" 5 #include "src/parser.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/ast-literal-reindexer.h" 9 #include "src/ast-literal-reindexer.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 !IsLexicalVariableMode(mode)) { 2101 !IsLexicalVariableMode(mode)) {
2102 // In a var binding in a sloppy direct eval, pollute the enclosing scope 2102 // In a var binding in a sloppy direct eval, pollute the enclosing scope
2103 // with this new binding by doing the following: 2103 // with this new binding by doing the following:
2104 // The proxy is bound to a lookup variable to force a dynamic declaration 2104 // The proxy is bound to a lookup variable to force a dynamic declaration
2105 // using the DeclareLookupSlot runtime function. 2105 // using the DeclareLookupSlot runtime function.
2106 Variable::Kind kind = Variable::NORMAL; 2106 Variable::Kind kind = Variable::NORMAL;
2107 // TODO(sigurds) figure out if kNotAssigned is OK here 2107 // TODO(sigurds) figure out if kNotAssigned is OK here
2108 var = new (zone()) Variable(declaration_scope, name, mode, kind, 2108 var = new (zone()) Variable(declaration_scope, name, mode, kind,
2109 declaration->initialization(), kNotAssigned); 2109 declaration->initialization(), kNotAssigned);
2110 var->AllocateTo(VariableLocation::LOOKUP, -1); 2110 var->AllocateTo(VariableLocation::LOOKUP, -1);
2111 var->SetFromEval();
2111 resolve = true; 2112 resolve = true;
2112 } 2113 }
2113 2114
2114 2115
2115 // We add a declaration node for every declaration. The compiler 2116 // We add a declaration node for every declaration. The compiler
2116 // will only generate code if necessary. In particular, declarations 2117 // will only generate code if necessary. In particular, declarations
2117 // for inner local variables that do not represent functions won't 2118 // for inner local variables that do not represent functions won't
2118 // result in any generated code. 2119 // result in any generated code.
2119 // 2120 //
2120 // Note that we always add an unresolved proxy even if it's not 2121 // Note that we always add an unresolved proxy even if it's not
(...skipping 4168 matching lines...) Expand 10 before | Expand all | Expand 10 after
6289 6290
6290 Expression* Parser::SpreadCallNew(Expression* function, 6291 Expression* Parser::SpreadCallNew(Expression* function,
6291 ZoneList<v8::internal::Expression*>* args, 6292 ZoneList<v8::internal::Expression*>* args,
6292 int pos) { 6293 int pos) {
6293 args->InsertAt(0, function, zone()); 6294 args->InsertAt(0, function, zone());
6294 6295
6295 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos); 6296 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos);
6296 } 6297 }
6297 } // namespace internal 6298 } // namespace internal
6298 } // namespace v8 6299 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698