| 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 break; | 597 break; |
| 598 case wasm::kExprF32Min: | 598 case wasm::kExprF32Min: |
| 599 return BuildF32Min(left, right); | 599 return BuildF32Min(left, right); |
| 600 case wasm::kExprF64Min: | 600 case wasm::kExprF64Min: |
| 601 return BuildF64Min(left, right); | 601 return BuildF64Min(left, right); |
| 602 case wasm::kExprF32Max: | 602 case wasm::kExprF32Max: |
| 603 return BuildF32Max(left, right); | 603 return BuildF32Max(left, right); |
| 604 case wasm::kExprF64Max: | 604 case wasm::kExprF64Max: |
| 605 return BuildF64Max(left, right); | 605 return BuildF64Max(left, right); |
| 606 case wasm::kExprF64Pow: | 606 case wasm::kExprF64Pow: |
| 607 return BuildF64Pow(left, right); | 607 op = m->Float64Pow(); |
| 608 break; |
| 608 case wasm::kExprF64Atan2: | 609 case wasm::kExprF64Atan2: |
| 609 op = m->Float64Atan2(); | 610 op = m->Float64Atan2(); |
| 610 break; | 611 break; |
| 611 case wasm::kExprF64Mod: | 612 case wasm::kExprF64Mod: |
| 612 return BuildF64Mod(left, right); | 613 return BuildF64Mod(left, right); |
| 613 case wasm::kExprI32AsmjsDivS: | 614 case wasm::kExprI32AsmjsDivS: |
| 614 return BuildI32AsmjsDivS(left, right); | 615 return BuildI32AsmjsDivS(left, right); |
| 615 case wasm::kExprI32AsmjsDivU: | 616 case wasm::kExprI32AsmjsDivU: |
| 616 return BuildI32AsmjsDivU(left, right); | 617 return BuildI32AsmjsDivU(left, right); |
| 617 case wasm::kExprI32AsmjsRemS: | 618 case wasm::kExprI32AsmjsRemS: |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 return BuildCFuncInstruction(ref, type, input); | 1346 return BuildCFuncInstruction(ref, type, input); |
| 1346 } | 1347 } |
| 1347 | 1348 |
| 1348 Node* WasmGraphBuilder::BuildF64Asin(Node* input) { | 1349 Node* WasmGraphBuilder::BuildF64Asin(Node* input) { |
| 1349 MachineType type = MachineType::Float64(); | 1350 MachineType type = MachineType::Float64(); |
| 1350 ExternalReference ref = | 1351 ExternalReference ref = |
| 1351 ExternalReference::f64_asin_wrapper_function(jsgraph()->isolate()); | 1352 ExternalReference::f64_asin_wrapper_function(jsgraph()->isolate()); |
| 1352 return BuildCFuncInstruction(ref, type, input); | 1353 return BuildCFuncInstruction(ref, type, input); |
| 1353 } | 1354 } |
| 1354 | 1355 |
| 1355 Node* WasmGraphBuilder::BuildF64Pow(Node* left, Node* right) { | |
| 1356 MachineType type = MachineType::Float64(); | |
| 1357 ExternalReference ref = | |
| 1358 ExternalReference::f64_pow_wrapper_function(jsgraph()->isolate()); | |
| 1359 return BuildCFuncInstruction(ref, type, left, right); | |
| 1360 } | |
| 1361 | |
| 1362 Node* WasmGraphBuilder::BuildF64Mod(Node* left, Node* right) { | 1356 Node* WasmGraphBuilder::BuildF64Mod(Node* left, Node* right) { |
| 1363 MachineType type = MachineType::Float64(); | 1357 MachineType type = MachineType::Float64(); |
| 1364 ExternalReference ref = | 1358 ExternalReference ref = |
| 1365 ExternalReference::f64_mod_wrapper_function(jsgraph()->isolate()); | 1359 ExternalReference::f64_mod_wrapper_function(jsgraph()->isolate()); |
| 1366 return BuildCFuncInstruction(ref, type, left, right); | 1360 return BuildCFuncInstruction(ref, type, left, right); |
| 1367 } | 1361 } |
| 1368 | 1362 |
| 1369 Node* WasmGraphBuilder::BuildCFuncInstruction(ExternalReference ref, | 1363 Node* WasmGraphBuilder::BuildCFuncInstruction(ExternalReference ref, |
| 1370 MachineType type, Node* input0, | 1364 MachineType type, Node* input0, |
| 1371 Node* input1) { | 1365 Node* input1) { |
| (...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3271 function_->code_start_offset), | 3265 function_->code_start_offset), |
| 3272 compile_ms); | 3266 compile_ms); |
| 3273 } | 3267 } |
| 3274 | 3268 |
| 3275 return code; | 3269 return code; |
| 3276 } | 3270 } |
| 3277 | 3271 |
| 3278 } // namespace compiler | 3272 } // namespace compiler |
| 3279 } // namespace internal | 3273 } // namespace internal |
| 3280 } // namespace v8 | 3274 } // namespace v8 |
| OLD | NEW |