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

Side by Side Diff: src/parsing/pattern-rewriter.cc

Issue 1491923003: Improve rendering of callsite with non-function target. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tests Created 5 years 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/parsing/parser.cc ('k') | src/parsing/preparser.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 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/ast.h" 5 #include "src/ast/ast.h"
6 #include "src/messages.h" 6 #include "src/messages.h"
7 #include "src/parsing/parameter-initializer-rewriter.h" 7 #include "src/parsing/parameter-initializer-rewriter.h"
8 #include "src/parsing/parser.h" 8 #include "src/parsing/parser.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 244 }
245 245
246 246
247 void Parser::PatternRewriter::VisitArrayLiteral(ArrayLiteral* node) { 247 void Parser::PatternRewriter::VisitArrayLiteral(ArrayLiteral* node) {
248 auto temp = CreateTempVar(current_value_); 248 auto temp = CreateTempVar(current_value_);
249 249
250 block_->statements()->Add(descriptor_->parser->BuildAssertIsCoercible(temp), 250 block_->statements()->Add(descriptor_->parser->BuildAssertIsCoercible(temp),
251 zone()); 251 zone());
252 252
253 auto iterator = CreateTempVar(descriptor_->parser->GetIterator( 253 auto iterator = CreateTempVar(descriptor_->parser->GetIterator(
254 factory()->NewVariableProxy(temp), factory())); 254 factory()->NewVariableProxy(temp), factory(), RelocInfo::kNoPosition));
255 auto done = CreateTempVar( 255 auto done = CreateTempVar(
256 factory()->NewBooleanLiteral(false, RelocInfo::kNoPosition)); 256 factory()->NewBooleanLiteral(false, RelocInfo::kNoPosition));
257 auto result = CreateTempVar(); 257 auto result = CreateTempVar();
258 auto v = CreateTempVar(); 258 auto v = CreateTempVar();
259 259
260 Spread* spread = nullptr; 260 Spread* spread = nullptr;
261 for (Expression* value : *node->values()) { 261 for (Expression* value : *node->values()) {
262 if (value->IsSpread()) { 262 if (value->IsSpread()) {
263 spread = value->AsSpread(); 263 spread = value->AsSpread();
264 break; 264 break;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 NOT_A_PATTERN(TryFinallyStatement) 426 NOT_A_PATTERN(TryFinallyStatement)
427 NOT_A_PATTERN(UnaryOperation) 427 NOT_A_PATTERN(UnaryOperation)
428 NOT_A_PATTERN(VariableDeclaration) 428 NOT_A_PATTERN(VariableDeclaration)
429 NOT_A_PATTERN(WhileStatement) 429 NOT_A_PATTERN(WhileStatement)
430 NOT_A_PATTERN(WithStatement) 430 NOT_A_PATTERN(WithStatement)
431 NOT_A_PATTERN(Yield) 431 NOT_A_PATTERN(Yield)
432 432
433 #undef NOT_A_PATTERN 433 #undef NOT_A_PATTERN
434 } // namespace internal 434 } // namespace internal
435 } // namespace v8 435 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698