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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 924453002: Fix invalid use of int in Zone. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Windows again... Created 5 years, 10 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 Emit(kArchJmp, g.NoOutput(), g.Label(target))->MarkAsControl(); 1057 Emit(kArchJmp, g.NoOutput(), g.Label(target))->MarkAsControl();
1058 } 1058 }
1059 1059
1060 1060
1061 void InstructionSelector::VisitSwitch(Node* node, BasicBlock** branches, 1061 void InstructionSelector::VisitSwitch(Node* node, BasicBlock** branches,
1062 size_t branch_count) { 1062 size_t branch_count) {
1063 OperandGenerator g(this); 1063 OperandGenerator g(this);
1064 Node* const value = node->InputAt(0); 1064 Node* const value = node->InputAt(0);
1065 size_t const input_count = branch_count + 1; 1065 size_t const input_count = branch_count + 1;
1066 InstructionOperand* const inputs = 1066 InstructionOperand* const inputs =
1067 zone()->NewArray<InstructionOperand>(static_cast<int>(input_count)); 1067 zone()->NewArray<InstructionOperand>(input_count);
1068 inputs[0] = g.UseRegister(value); 1068 inputs[0] = g.UseRegister(value);
1069 for (size_t index = 0; index < branch_count; ++index) { 1069 for (size_t index = 0; index < branch_count; ++index) {
1070 inputs[index + 1] = g.Label(branches[index]); 1070 inputs[index + 1] = g.Label(branches[index]);
1071 } 1071 }
1072 Emit(kArchSwitch, 0, nullptr, input_count, inputs, 0, nullptr) 1072 Emit(kArchSwitch, 0, nullptr, input_count, inputs, 0, nullptr)
1073 ->MarkAsControl(); 1073 ->MarkAsControl();
1074 } 1074 }
1075 1075
1076 1076
1077 void InstructionSelector::VisitReturn(Node* value) { 1077 void InstructionSelector::VisitReturn(Node* value) {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 MachineOperatorBuilder::Flags 1212 MachineOperatorBuilder::Flags
1213 InstructionSelector::SupportedMachineOperatorFlags() { 1213 InstructionSelector::SupportedMachineOperatorFlags() {
1214 return MachineOperatorBuilder::Flag::kNoFlags; 1214 return MachineOperatorBuilder::Flag::kNoFlags;
1215 } 1215 }
1216 1216
1217 #endif // !V8_TURBOFAN_BACKEND 1217 #endif // !V8_TURBOFAN_BACKEND
1218 1218
1219 } // namespace compiler 1219 } // namespace compiler
1220 } // namespace internal 1220 } // namespace internal
1221 } // namespace v8 1221 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/node-cache.cc » ('j') | src/zone.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698