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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 987083003: [es6] support rest parameters in arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix preparser bug Created 5 years, 9 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2288 VisitForValue(expr->left()); 2288 VisitForValue(expr->left());
2289 VisitForValue(expr->right()); 2289 VisitForValue(expr->right());
2290 Node* right = environment()->Pop(); 2290 Node* right = environment()->Pop();
2291 Node* left = environment()->Pop(); 2291 Node* left = environment()->Pop();
2292 Node* value = NewNode(op, left, right); 2292 Node* value = NewNode(op, left, right);
2293 PrepareFrameState(value, expr->id(), ast_context()->GetStateCombine()); 2293 PrepareFrameState(value, expr->id(), ast_context()->GetStateCombine());
2294 ast_context()->ProduceValue(value); 2294 ast_context()->ProduceValue(value);
2295 } 2295 }
2296 2296
2297 2297
2298 void AstGraphBuilder::VisitSpreadOperation(SpreadOperation* expr) {
2299 UNREACHABLE();
2300 }
2301
2302
2298 void AstGraphBuilder::VisitThisFunction(ThisFunction* expr) { 2303 void AstGraphBuilder::VisitThisFunction(ThisFunction* expr) {
2299 Node* value = GetFunctionClosure(); 2304 Node* value = GetFunctionClosure();
2300 ast_context()->ProduceValue(value); 2305 ast_context()->ProduceValue(value);
2301 } 2306 }
2302 2307
2303 2308
2304 void AstGraphBuilder::VisitSuperReference(SuperReference* expr) { 2309 void AstGraphBuilder::VisitSuperReference(SuperReference* expr) {
2305 // TODO(turbofan): Implement super here. 2310 // TODO(turbofan): Implement super here.
2306 SetStackOverflow(); 2311 SetStackOverflow();
2307 ast_context()->ProduceValue(jsgraph()->UndefinedConstant()); 2312 ast_context()->ProduceValue(jsgraph()->UndefinedConstant());
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 // Phi does not exist yet, introduce one. 3305 // Phi does not exist yet, introduce one.
3301 value = NewPhi(inputs, value, control); 3306 value = NewPhi(inputs, value, control);
3302 value->ReplaceInput(inputs - 1, other); 3307 value->ReplaceInput(inputs - 1, other);
3303 } 3308 }
3304 return value; 3309 return value;
3305 } 3310 }
3306 3311
3307 } // namespace compiler 3312 } // namespace compiler
3308 } // namespace internal 3313 } // namespace internal
3309 } // namespace v8 3314 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698