| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 if (cont->IsBranch()) { | 102 if (cont->IsBranch()) { |
| 103 inputs[input_count++] = g.Label(cont->true_block()); | 103 inputs[input_count++] = g.Label(cont->true_block()); |
| 104 inputs[input_count++] = g.Label(cont->false_block()); | 104 inputs[input_count++] = g.Label(cont->false_block()); |
| 105 } | 105 } |
| 106 | 106 |
| 107 outputs[output_count++] = g.DefineAsRegister(node); | 107 outputs[output_count++] = g.DefineAsRegister(node); |
| 108 if (cont->IsSet()) { | 108 if (cont->IsSet()) { |
| 109 outputs[output_count++] = g.DefineAsRegister(cont->result()); | 109 outputs[output_count++] = g.DefineAsRegister(cont->result()); |
| 110 } | 110 } |
| 111 | 111 |
| 112 DCHECK_NE(0, input_count); | 112 DCHECK_NE(0u, input_count); |
| 113 DCHECK_NE(0, output_count); | 113 DCHECK_NE(0u, output_count); |
| 114 DCHECK_GE(arraysize(inputs), input_count); | 114 DCHECK_GE(arraysize(inputs), input_count); |
| 115 DCHECK_GE(arraysize(outputs), output_count); | 115 DCHECK_GE(arraysize(outputs), output_count); |
| 116 | 116 |
| 117 Instruction* instr = selector->Emit(cont->Encode(opcode), output_count, | 117 Instruction* instr = selector->Emit(cont->Encode(opcode), output_count, |
| 118 outputs, input_count, inputs); | 118 outputs, input_count, inputs); |
| 119 if (cont->IsBranch()) instr->MarkAsControl(); | 119 if (cont->IsBranch()) instr->MarkAsControl(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 | 122 |
| 123 static void VisitBinop(InstructionSelector* selector, Node* node, | 123 static void VisitBinop(InstructionSelector* selector, Node* node, |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 return MachineOperatorBuilder::kFloat64Floor | | 823 return MachineOperatorBuilder::kFloat64Floor | |
| 824 MachineOperatorBuilder::kFloat64Ceil | | 824 MachineOperatorBuilder::kFloat64Ceil | |
| 825 MachineOperatorBuilder::kFloat64RoundTruncate; | 825 MachineOperatorBuilder::kFloat64RoundTruncate; |
| 826 } | 826 } |
| 827 return MachineOperatorBuilder::kNoFlags; | 827 return MachineOperatorBuilder::kNoFlags; |
| 828 } | 828 } |
| 829 | 829 |
| 830 } // namespace compiler | 830 } // namespace compiler |
| 831 } // namespace internal | 831 } // namespace internal |
| 832 } // namespace v8 | 832 } // namespace v8 |
| OLD | NEW |