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

Side by Side Diff: src/ast/ast.cc

Issue 1592713002: Clean up dead code after spread desugaring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bug that visited dead AST node in for/of Created 4 years, 11 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 | « no previous file | src/ast/ast-literal-reindexer.cc » ('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/ast/ast.h" 5 #include "src/ast/ast.h"
6 6
7 #include <cmath> // For isfinite. 7 #include <cmath> // For isfinite.
8 8
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 567
568 568
569 void ArrayLiteral::AssignFeedbackVectorSlots(Isolate* isolate, 569 void ArrayLiteral::AssignFeedbackVectorSlots(Isolate* isolate,
570 FeedbackVectorSpec* spec, 570 FeedbackVectorSpec* spec,
571 FeedbackVectorSlotCache* cache) { 571 FeedbackVectorSlotCache* cache) {
572 // This logic that computes the number of slots needed for vector store 572 // This logic that computes the number of slots needed for vector store
573 // ics must mirror FullCodeGenerator::VisitArrayLiteral. 573 // ics must mirror FullCodeGenerator::VisitArrayLiteral.
574 int array_index = 0; 574 int array_index = 0;
575 for (; array_index < values()->length(); array_index++) { 575 for (; array_index < values()->length(); array_index++) {
576 Expression* subexpr = values()->at(array_index); 576 Expression* subexpr = values()->at(array_index);
577 if (subexpr->IsSpread()) break; 577 DCHECK(!subexpr->IsSpread());
578 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; 578 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
579 579
580 // We'll reuse the same literal slot for all of the non-constant 580 // We'll reuse the same literal slot for all of the non-constant
581 // subexpressions that use a keyed store IC. 581 // subexpressions that use a keyed store IC.
582 literal_slot_ = spec->AddKeyedStoreICSlot(); 582 literal_slot_ = spec->AddKeyedStoreICSlot();
583 return; 583 return;
584 } 584 }
585 } 585 }
586 586
587 587
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 bool Literal::Match(void* literal1, void* literal2) { 838 bool Literal::Match(void* literal1, void* literal2) {
839 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 839 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
840 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 840 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
841 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 841 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
842 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 842 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
843 } 843 }
844 844
845 845
846 } // namespace internal 846 } // namespace internal
847 } // namespace v8 847 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ast/ast-literal-reindexer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698