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

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

Issue 2324013002: [cleanup] Remove dead code for handling pre-desugaring spread implementation (Closed)
Patch Set: Created 4 years, 3 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/compiler/ast-graph-builder.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/compile-time-value.h" 9 #include "src/ast/compile-time-value.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 set_is_simple(is_simple); 642 set_is_simple(is_simple);
643 set_depth(depth_acc); 643 set_depth(depth_acc);
644 } 644 }
645 645
646 646
647 void ArrayLiteral::AssignFeedbackVectorSlots(Isolate* isolate, 647 void ArrayLiteral::AssignFeedbackVectorSlots(Isolate* isolate,
648 FeedbackVectorSpec* spec, 648 FeedbackVectorSpec* spec,
649 FeedbackVectorSlotCache* cache) { 649 FeedbackVectorSlotCache* cache) {
650 // This logic that computes the number of slots needed for vector store 650 // This logic that computes the number of slots needed for vector store
651 // ics must mirror FullCodeGenerator::VisitArrayLiteral. 651 // ics must mirror FullCodeGenerator::VisitArrayLiteral.
652 int array_index = 0; 652 for (int array_index = 0; array_index < values()->length(); array_index++) {
653 for (; array_index < values()->length(); array_index++) {
654 Expression* subexpr = values()->at(array_index); 653 Expression* subexpr = values()->at(array_index);
655 DCHECK(!subexpr->IsSpread()); 654 DCHECK(!subexpr->IsSpread());
656 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; 655 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
657 656
658 // We'll reuse the same literal slot for all of the non-constant 657 // We'll reuse the same literal slot for all of the non-constant
659 // subexpressions that use a keyed store IC. 658 // subexpressions that use a keyed store IC.
660 literal_slot_ = spec->AddKeyedStoreICSlot(); 659 literal_slot_ = spec->AddKeyedStoreICSlot();
661 return; 660 return;
662 } 661 }
663 } 662 }
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 // static 958 // static
960 bool Literal::Match(void* literal1, void* literal2) { 959 bool Literal::Match(void* literal1, void* literal2) {
961 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 960 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
962 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 961 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
963 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 962 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
964 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 963 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
965 } 964 }
966 965
967 } // namespace internal 966 } // namespace internal
968 } // namespace v8 967 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698