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

Side by Side Diff: src/ast-literal-reindexer.cc

Issue 1309813007: [es6] implement destructuring assignment (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: An implementation Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/ast-literal-reindexer.h" 5 #include "src/ast-literal-reindexer.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/scopes.h" 8 #include "src/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (node->constructor()) Visit(node->constructor()); 248 if (node->constructor()) Visit(node->constructor());
249 if (node->class_variable_proxy()) { 249 if (node->class_variable_proxy()) {
250 VisitVariableProxy(node->class_variable_proxy()); 250 VisitVariableProxy(node->class_variable_proxy());
251 } 251 }
252 for (int i = 0; i < node->properties()->length(); i++) { 252 for (int i = 0; i < node->properties()->length(); i++) {
253 VisitObjectLiteralProperty(node->properties()->at(i)); 253 VisitObjectLiteralProperty(node->properties()->at(i));
254 } 254 }
255 } 255 }
256 256
257 257
258 void AstLiteralReindexer::VisitAssignmentPattern(AssignmentPattern* node) {
259 Visit(node->pattern());
260 }
261
262
258 void AstLiteralReindexer::VisitObjectLiteral(ObjectLiteral* node) { 263 void AstLiteralReindexer::VisitObjectLiteral(ObjectLiteral* node) {
259 UpdateIndex(node); 264 UpdateIndex(node);
260 for (int i = 0; i < node->properties()->length(); i++) { 265 for (int i = 0; i < node->properties()->length(); i++) {
261 VisitObjectLiteralProperty(node->properties()->at(i)); 266 VisitObjectLiteralProperty(node->properties()->at(i));
262 } 267 }
263 } 268 }
264 269
265 270
266 void AstLiteralReindexer::VisitObjectLiteralProperty( 271 void AstLiteralReindexer::VisitObjectLiteralProperty(
267 ObjectLiteralProperty* node) { 272 ObjectLiteralProperty* node) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) { 321 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) {
317 // We don't recurse into the declarations or body of the function literal: 322 // We don't recurse into the declarations or body of the function literal:
318 } 323 }
319 324
320 325
321 void AstLiteralReindexer::Reindex(Expression* pattern) { 326 void AstLiteralReindexer::Reindex(Expression* pattern) {
322 pattern->Accept(this); 327 pattern->Accept(this);
323 } 328 }
324 } // namespace internal 329 } // namespace internal
325 } // namespace v8 330 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698