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

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: 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') | src/ast/ast-literal-reindexer.cc » ('J')
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 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins.h" 9 #include "src/builtins.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 547
548 void ArrayLiteral::AssignFeedbackVectorSlots(Isolate* isolate, 548 void ArrayLiteral::AssignFeedbackVectorSlots(Isolate* isolate,
549 FeedbackVectorSpec* spec, 549 FeedbackVectorSpec* spec,
550 FeedbackVectorSlotCache* cache) { 550 FeedbackVectorSlotCache* cache) {
551 // This logic that computes the number of slots needed for vector store 551 // This logic that computes the number of slots needed for vector store
552 // ics must mirror FullCodeGenerator::VisitArrayLiteral. 552 // ics must mirror FullCodeGenerator::VisitArrayLiteral.
553 int array_index = 0; 553 int array_index = 0;
554 for (; array_index < values()->length(); array_index++) { 554 for (; array_index < values()->length(); array_index++) {
555 Expression* subexpr = values()->at(array_index); 555 Expression* subexpr = values()->at(array_index);
556 if (subexpr->IsSpread()) break; 556 DCHECK(!subexpr->IsSpread());
557 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; 557 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
558 558
559 // We'll reuse the same literal slot for all of the non-constant 559 // We'll reuse the same literal slot for all of the non-constant
560 // subexpressions that use a keyed store IC. 560 // subexpressions that use a keyed store IC.
561 literal_slot_ = spec->AddKeyedStoreICSlot(); 561 literal_slot_ = spec->AddKeyedStoreICSlot();
562 return; 562 return;
563 } 563 }
564 } 564 }
565 565
566 566
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 bool Literal::Match(void* literal1, void* literal2) { 817 bool Literal::Match(void* literal1, void* literal2) {
818 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 818 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
819 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 819 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
820 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 820 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
821 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 821 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
822 } 822 }
823 823
824 824
825 } // namespace internal 825 } // namespace internal
826 } // namespace v8 826 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ast/ast-literal-reindexer.cc » ('j') | src/ast/ast-literal-reindexer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698