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

Side by Side Diff: src/compiler/code-assembler.cc

Issue 2146293003: [builtins] implement Array.prototype.includes in TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add a basic impl in ElementsAccessor, cleanup %ArrayIncludes_Slow, lots of new tests Created 4 years, 5 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 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/compiler/code-assembler.h" 5 #include "src/compiler/code-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 702
703 void CodeAssembler::Branch(Node* condition, CodeAssembler::Label* true_label, 703 void CodeAssembler::Branch(Node* condition, CodeAssembler::Label* true_label,
704 CodeAssembler::Label* false_label) { 704 CodeAssembler::Label* false_label) {
705 true_label->MergeVariables(); 705 true_label->MergeVariables();
706 false_label->MergeVariables(); 706 false_label->MergeVariables();
707 return raw_assembler_->Branch(condition, true_label->label_, 707 return raw_assembler_->Branch(condition, true_label->label_,
708 false_label->label_); 708 false_label->label_);
709 } 709 }
710 710
711 void CodeAssembler::Switch(Node* index, Label* default_label, 711 void CodeAssembler::Switch(Node* index, Label* default_label,
712 int32_t* case_values, Label** case_labels, 712 const int32_t* case_values, Label** case_labels,
713 size_t case_count) { 713 size_t case_count) {
714 RawMachineLabel** labels = 714 RawMachineLabel** labels =
715 new (zone()->New(sizeof(RawMachineLabel*) * case_count)) 715 new (zone()->New(sizeof(RawMachineLabel*) * case_count))
716 RawMachineLabel*[case_count]; 716 RawMachineLabel*[case_count];
717 for (size_t i = 0; i < case_count; ++i) { 717 for (size_t i = 0; i < case_count; ++i) {
718 labels[i] = case_labels[i]->label_; 718 labels[i] = case_labels[i]->label_;
719 case_labels[i]->MergeVariables(); 719 case_labels[i]->MergeVariables();
720 default_label->MergeVariables(); 720 default_label->MergeVariables();
721 } 721 }
722 return raw_assembler_->Switch(index, default_label->label_, case_values, 722 return raw_assembler_->Switch(index, default_label->label_, case_values,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 } 898 }
899 } 899 }
900 } 900 }
901 901
902 bound_ = true; 902 bound_ = true;
903 } 903 }
904 904
905 } // namespace compiler 905 } // namespace compiler
906 } // namespace internal 906 } // namespace internal
907 } // namespace v8 907 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698