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

Side by Side Diff: src/hydrogen.cc

Issue 938443002: [es6] implement spread calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Eagerly iterate spread expressions, make parser more complicated, simplify harmony-spread Created 5 years, 10 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 11125 matching lines...) Expand 10 before | Expand all | Expand 10 after
11136 DCHECK_EQ(Token::EQ, expr->op()); 11136 DCHECK_EQ(Token::EQ, expr->op());
11137 Type* type = expr->combined_type()->Is(Type::None()) 11137 Type* type = expr->combined_type()->Is(Type::None())
11138 ? Type::Any(zone()) : expr->combined_type(); 11138 ? Type::Any(zone()) : expr->combined_type();
11139 HIfContinuation continuation; 11139 HIfContinuation continuation;
11140 BuildCompareNil(value, type, &continuation); 11140 BuildCompareNil(value, type, &continuation);
11141 return ast_context()->ReturnContinuation(&continuation, expr->id()); 11141 return ast_context()->ReturnContinuation(&continuation, expr->id());
11142 } 11142 }
11143 } 11143 }
11144 11144
11145 11145
11146 void HOptimizedGraphBuilder::VisitSpreadOperation(SpreadOperation* expr) {
11147 Visit(expr->expression());
11148 }
11149
11150
11146 HInstruction* HOptimizedGraphBuilder::BuildThisFunction() { 11151 HInstruction* HOptimizedGraphBuilder::BuildThisFunction() {
11147 // If we share optimized code between different closures, the 11152 // If we share optimized code between different closures, the
11148 // this-function is not a constant, except inside an inlined body. 11153 // this-function is not a constant, except inside an inlined body.
11149 if (function_state()->outer() != NULL) { 11154 if (function_state()->outer() != NULL) {
11150 return New<HConstant>( 11155 return New<HConstant>(
11151 function_state()->compilation_info()->closure()); 11156 function_state()->compilation_info()->closure());
11152 } else { 11157 } else {
11153 return New<HThisFunction>(); 11158 return New<HThisFunction>();
11154 } 11159 }
11155 } 11160 }
(...skipping 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after
13514 if (ShouldProduceTraceOutput()) { 13519 if (ShouldProduceTraceOutput()) {
13515 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13520 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13516 } 13521 }
13517 13522
13518 #ifdef DEBUG 13523 #ifdef DEBUG
13519 graph_->Verify(false); // No full verify. 13524 graph_->Verify(false); // No full verify.
13520 #endif 13525 #endif
13521 } 13526 }
13522 13527
13523 } } // namespace v8::internal 13528 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698