| 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 #include "src/compiler/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" |
| 6 | 6 |
| 7 #include "src/isolate-inl.h" | 7 #include "src/isolate-inl.h" |
| 8 | 8 |
| 9 #include "src/base/platform/elapsed-timer.h" | 9 #include "src/base/platform/elapsed-timer.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 break; | 602 break; |
| 603 case wasm::kExprF32Min: | 603 case wasm::kExprF32Min: |
| 604 return BuildF32Min(left, right); | 604 return BuildF32Min(left, right); |
| 605 case wasm::kExprF64Min: | 605 case wasm::kExprF64Min: |
| 606 return BuildF64Min(left, right); | 606 return BuildF64Min(left, right); |
| 607 case wasm::kExprF32Max: | 607 case wasm::kExprF32Max: |
| 608 return BuildF32Max(left, right); | 608 return BuildF32Max(left, right); |
| 609 case wasm::kExprF64Max: | 609 case wasm::kExprF64Max: |
| 610 return BuildF64Max(left, right); | 610 return BuildF64Max(left, right); |
| 611 case wasm::kExprF64Pow: | 611 case wasm::kExprF64Pow: |
| 612 op = m->Float64Pow(); | 612 return BuildF64Pow(left, right); |
| 613 break; | |
| 614 case wasm::kExprF64Atan2: | 613 case wasm::kExprF64Atan2: |
| 615 op = m->Float64Atan2(); | 614 op = m->Float64Atan2(); |
| 616 break; | 615 break; |
| 617 case wasm::kExprF64Mod: | 616 case wasm::kExprF64Mod: |
| 618 return BuildF64Mod(left, right); | 617 return BuildF64Mod(left, right); |
| 619 case wasm::kExprI32AsmjsDivS: | 618 case wasm::kExprI32AsmjsDivS: |
| 620 return BuildI32AsmjsDivS(left, right); | 619 return BuildI32AsmjsDivS(left, right); |
| 621 case wasm::kExprI32AsmjsDivU: | 620 case wasm::kExprI32AsmjsDivU: |
| 622 return BuildI32AsmjsDivU(left, right); | 621 return BuildI32AsmjsDivU(left, right); |
| 623 case wasm::kExprI32AsmjsRemS: | 622 case wasm::kExprI32AsmjsRemS: |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 return BuildCFuncInstruction(ref, type, input); | 1482 return BuildCFuncInstruction(ref, type, input); |
| 1484 } | 1483 } |
| 1485 | 1484 |
| 1486 Node* WasmGraphBuilder::BuildF64Asin(Node* input) { | 1485 Node* WasmGraphBuilder::BuildF64Asin(Node* input) { |
| 1487 MachineType type = MachineType::Float64(); | 1486 MachineType type = MachineType::Float64(); |
| 1488 ExternalReference ref = | 1487 ExternalReference ref = |
| 1489 ExternalReference::f64_asin_wrapper_function(jsgraph()->isolate()); | 1488 ExternalReference::f64_asin_wrapper_function(jsgraph()->isolate()); |
| 1490 return BuildCFuncInstruction(ref, type, input); | 1489 return BuildCFuncInstruction(ref, type, input); |
| 1491 } | 1490 } |
| 1492 | 1491 |
| 1492 Node* WasmGraphBuilder::BuildF64Pow(Node* left, Node* right) { |
| 1493 MachineType type = MachineType::Float64(); |
| 1494 ExternalReference ref = |
| 1495 ExternalReference::wasm_float64_pow(jsgraph()->isolate()); |
| 1496 return BuildCFuncInstruction(ref, type, left, right); |
| 1497 } |
| 1498 |
| 1493 Node* WasmGraphBuilder::BuildF64Mod(Node* left, Node* right) { | 1499 Node* WasmGraphBuilder::BuildF64Mod(Node* left, Node* right) { |
| 1494 MachineType type = MachineType::Float64(); | 1500 MachineType type = MachineType::Float64(); |
| 1495 ExternalReference ref = | 1501 ExternalReference ref = |
| 1496 ExternalReference::f64_mod_wrapper_function(jsgraph()->isolate()); | 1502 ExternalReference::f64_mod_wrapper_function(jsgraph()->isolate()); |
| 1497 return BuildCFuncInstruction(ref, type, left, right); | 1503 return BuildCFuncInstruction(ref, type, left, right); |
| 1498 } | 1504 } |
| 1499 | 1505 |
| 1500 Node* WasmGraphBuilder::BuildCFuncInstruction(ExternalReference ref, | 1506 Node* WasmGraphBuilder::BuildCFuncInstruction(ExternalReference ref, |
| 1501 MachineType type, Node* input0, | 1507 MachineType type, Node* input0, |
| 1502 Node* input1) { | 1508 Node* input1) { |
| (...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3661 function_->code_start_offset), | 3667 function_->code_start_offset), |
| 3662 compile_ms); | 3668 compile_ms); |
| 3663 } | 3669 } |
| 3664 | 3670 |
| 3665 return code; | 3671 return code; |
| 3666 } | 3672 } |
| 3667 | 3673 |
| 3668 } // namespace compiler | 3674 } // namespace compiler |
| 3669 } // namespace internal | 3675 } // namespace internal |
| 3670 } // namespace v8 | 3676 } // namespace v8 |
| OLD | NEW |