| OLD | NEW |
| 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 | 5 |
| 6 #include "src/compiler/access-builder.h" | 6 #include "src/compiler/access-builder.h" |
| 7 #include "src/compiler/change-lowering.h" | 7 #include "src/compiler/change-lowering.h" |
| 8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
| 9 #include "src/compiler/diamond.h" | 9 #include "src/compiler/diamond.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 const Operator* op; | 662 const Operator* op; |
| 663 MachineOperatorBuilder* m = jsgraph()->machine(); | 663 MachineOperatorBuilder* m = jsgraph()->machine(); |
| 664 switch (opcode) { | 664 switch (opcode) { |
| 665 case wasm::kExprBoolNot: | 665 case wasm::kExprBoolNot: |
| 666 op = m->Word32Equal(); | 666 op = m->Word32Equal(); |
| 667 return graph()->NewNode(op, input, jsgraph()->Int32Constant(0)); | 667 return graph()->NewNode(op, input, jsgraph()->Int32Constant(0)); |
| 668 case wasm::kExprF32Abs: | 668 case wasm::kExprF32Abs: |
| 669 op = m->Float32Abs(); | 669 op = m->Float32Abs(); |
| 670 break; | 670 break; |
| 671 case wasm::kExprF32Neg: | 671 case wasm::kExprF32Neg: |
| 672 op = m->Float32Sub(); | 672 op = m->Float32Mul(); |
| 673 return graph()->NewNode(op, jsgraph()->Float32Constant(0), input); | 673 return graph()->NewNode(op, jsgraph()->Float32Constant(-1), input); |
| 674 case wasm::kExprF32Sqrt: | 674 case wasm::kExprF32Sqrt: |
| 675 op = m->Float32Sqrt(); | 675 op = m->Float32Sqrt(); |
| 676 break; | 676 break; |
| 677 case wasm::kExprF64Abs: | 677 case wasm::kExprF64Abs: |
| 678 op = m->Float64Abs(); | 678 op = m->Float64Abs(); |
| 679 break; | 679 break; |
| 680 case wasm::kExprF64Neg: | 680 case wasm::kExprF64Neg: |
| 681 op = m->Float64Sub(); | 681 op = m->Float64Mul(); |
| 682 return graph()->NewNode(op, jsgraph()->Float64Constant(0), input); | 682 return graph()->NewNode(op, jsgraph()->Float64Constant(-1), input); |
| 683 case wasm::kExprF64Sqrt: | 683 case wasm::kExprF64Sqrt: |
| 684 op = m->Float64Sqrt(); | 684 op = m->Float64Sqrt(); |
| 685 break; | 685 break; |
| 686 case wasm::kExprI32SConvertF64: | 686 case wasm::kExprI32SConvertF64: |
| 687 op = m->ChangeFloat64ToInt32(); | 687 op = m->ChangeFloat64ToInt32(); |
| 688 break; | 688 break; |
| 689 case wasm::kExprI32UConvertF64: | 689 case wasm::kExprI32UConvertF64: |
| 690 op = m->ChangeFloat64ToUint32(); | 690 op = m->ChangeFloat64ToUint32(); |
| 691 break; | 691 break; |
| 692 case wasm::kExprF32ConvertF64: | 692 case wasm::kExprF32ConvertF64: |
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 code->Disassemble(buffer, os); | 1830 code->Disassemble(buffer, os); |
| 1831 } | 1831 } |
| 1832 #endif | 1832 #endif |
| 1833 return code; | 1833 return code; |
| 1834 } | 1834 } |
| 1835 | 1835 |
| 1836 | 1836 |
| 1837 } // namespace compiler | 1837 } // namespace compiler |
| 1838 } // namespace internal | 1838 } // namespace internal |
| 1839 } // namespace v8 | 1839 } // namespace v8 |
| OLD | NEW |