OLD | NEW |
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/base/bits.h" | 5 #include "src/base/bits.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 if (cont->IsBranch()) { | 135 if (cont->IsBranch()) { |
136 inputs[input_count++] = g.Label(cont->true_block()); | 136 inputs[input_count++] = g.Label(cont->true_block()); |
137 inputs[input_count++] = g.Label(cont->false_block()); | 137 inputs[input_count++] = g.Label(cont->false_block()); |
138 } | 138 } |
139 | 139 |
140 outputs[output_count++] = g.DefineAsRegister(node); | 140 outputs[output_count++] = g.DefineAsRegister(node); |
141 if (cont->IsSet()) { | 141 if (cont->IsSet()) { |
142 outputs[output_count++] = g.DefineAsRegister(cont->result()); | 142 outputs[output_count++] = g.DefineAsRegister(cont->result()); |
143 } | 143 } |
144 | 144 |
145 DCHECK_NE(0, input_count); | 145 DCHECK_NE(0u, input_count); |
146 DCHECK_NE(0, output_count); | 146 DCHECK_NE(0u, output_count); |
147 DCHECK_GE(arraysize(inputs), input_count); | 147 DCHECK_GE(arraysize(inputs), input_count); |
148 DCHECK_GE(arraysize(outputs), output_count); | 148 DCHECK_GE(arraysize(outputs), output_count); |
149 | 149 |
150 Instruction* instr = selector->Emit(cont->Encode(opcode), output_count, | 150 Instruction* instr = selector->Emit(cont->Encode(opcode), output_count, |
151 outputs, input_count, inputs); | 151 outputs, input_count, inputs); |
152 if (cont->IsBranch()) instr->MarkAsControl(); | 152 if (cont->IsBranch()) instr->MarkAsControl(); |
153 } | 153 } |
154 | 154 |
155 | 155 |
156 static void VisitBinop(InstructionSelector* selector, Node* node, | 156 static void VisitBinop(InstructionSelector* selector, Node* node, |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 MachineOperatorBuilder::Flags | 1071 MachineOperatorBuilder::Flags |
1072 InstructionSelector::SupportedMachineOperatorFlags() { | 1072 InstructionSelector::SupportedMachineOperatorFlags() { |
1073 return MachineOperatorBuilder::kFloat64Floor | | 1073 return MachineOperatorBuilder::kFloat64Floor | |
1074 MachineOperatorBuilder::kFloat64Ceil | | 1074 MachineOperatorBuilder::kFloat64Ceil | |
1075 MachineOperatorBuilder::kFloat64RoundTruncate; | 1075 MachineOperatorBuilder::kFloat64RoundTruncate; |
1076 } | 1076 } |
1077 | 1077 |
1078 } // namespace compiler | 1078 } // namespace compiler |
1079 } // namespace internal | 1079 } // namespace internal |
1080 } // namespace v8 | 1080 } // namespace v8 |
OLD | NEW |