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

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

Issue 2205883003: Reland [builtins] implement Array.prototype.includes in TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compiler warning Created 4 years, 4 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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 862
863 void CodeAssembler::Branch(Node* condition, CodeAssembler::Label* true_label, 863 void CodeAssembler::Branch(Node* condition, CodeAssembler::Label* true_label,
864 CodeAssembler::Label* false_label) { 864 CodeAssembler::Label* false_label) {
865 true_label->MergeVariables(); 865 true_label->MergeVariables();
866 false_label->MergeVariables(); 866 false_label->MergeVariables();
867 return raw_assembler_->Branch(condition, true_label->label_, 867 return raw_assembler_->Branch(condition, true_label->label_,
868 false_label->label_); 868 false_label->label_);
869 } 869 }
870 870
871 void CodeAssembler::Switch(Node* index, Label* default_label, 871 void CodeAssembler::Switch(Node* index, Label* default_label,
872 int32_t* case_values, Label** case_labels, 872 const int32_t* case_values, Label** case_labels,
873 size_t case_count) { 873 size_t case_count) {
874 RawMachineLabel** labels = 874 RawMachineLabel** labels =
875 new (zone()->New(sizeof(RawMachineLabel*) * case_count)) 875 new (zone()->New(sizeof(RawMachineLabel*) * case_count))
876 RawMachineLabel*[case_count]; 876 RawMachineLabel*[case_count];
877 for (size_t i = 0; i < case_count; ++i) { 877 for (size_t i = 0; i < case_count; ++i) {
878 labels[i] = case_labels[i]->label_; 878 labels[i] = case_labels[i]->label_;
879 case_labels[i]->MergeVariables(); 879 case_labels[i]->MergeVariables();
880 default_label->MergeVariables(); 880 default_label->MergeVariables();
881 } 881 }
882 return raw_assembler_->Switch(index, default_label->label_, case_values, 882 return raw_assembler_->Switch(index, default_label->label_, case_values,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 } 1058 }
1059 } 1059 }
1060 } 1060 }
1061 1061
1062 bound_ = true; 1062 bound_ = true;
1063 } 1063 }
1064 1064
1065 } // namespace compiler 1065 } // namespace compiler
1066 } // namespace internal 1066 } // namespace internal
1067 } // namespace v8 1067 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698