| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 10 | 10 |
| (...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2425 CommonOperatorBuilder* common = jsgraph()->common(); | 2425 CommonOperatorBuilder* common = jsgraph()->common(); |
| 2426 | 2426 |
| 2427 if (CanCover(value, IrOpcode::kJSToNumber)) { | 2427 if (CanCover(value, IrOpcode::kJSToNumber)) { |
| 2428 // ChangeTaggedToFloat64(JSToNumber(x)) => | 2428 // ChangeTaggedToFloat64(JSToNumber(x)) => |
| 2429 // if IsSmi(x) then ChangeSmiToFloat64(x) | 2429 // if IsSmi(x) then ChangeSmiToFloat64(x) |
| 2430 // else let y = JSToNumber(x) in | 2430 // else let y = JSToNumber(x) in |
| 2431 // if IsSmi(y) then ChangeSmiToFloat64(y) | 2431 // if IsSmi(y) then ChangeSmiToFloat64(y) |
| 2432 // else BuildLoadHeapNumberValue(y) | 2432 // else BuildLoadHeapNumberValue(y) |
| 2433 Node* object = NodeProperties::GetValueInput(value, 0); | 2433 Node* object = NodeProperties::GetValueInput(value, 0); |
| 2434 Node* context = NodeProperties::GetContextInput(value); | 2434 Node* context = NodeProperties::GetContextInput(value); |
| 2435 Node* frame_state = NodeProperties::GetFrameStateInput(value, 0); | 2435 Node* frame_state = NodeProperties::GetFrameStateInput(value); |
| 2436 Node* effect = NodeProperties::GetEffectInput(value); | 2436 Node* effect = NodeProperties::GetEffectInput(value); |
| 2437 Node* control = NodeProperties::GetControlInput(value); | 2437 Node* control = NodeProperties::GetControlInput(value); |
| 2438 | 2438 |
| 2439 const Operator* merge_op = common->Merge(2); | 2439 const Operator* merge_op = common->Merge(2); |
| 2440 const Operator* ephi_op = common->EffectPhi(2); | 2440 const Operator* ephi_op = common->EffectPhi(2); |
| 2441 const Operator* phi_op = common->Phi(MachineRepresentation::kFloat64, 2); | 2441 const Operator* phi_op = common->Phi(MachineRepresentation::kFloat64, 2); |
| 2442 | 2442 |
| 2443 Node* check1 = BuildTestNotSmi(object); | 2443 Node* check1 = BuildTestNotSmi(object); |
| 2444 Node* branch1 = | 2444 Node* branch1 = |
| 2445 graph()->NewNode(common->Branch(BranchHint::kFalse), check1, control); | 2445 graph()->NewNode(common->Branch(BranchHint::kFalse), check1, control); |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3496 function_->code_start_offset), | 3496 function_->code_start_offset), |
| 3497 compile_ms); | 3497 compile_ms); |
| 3498 } | 3498 } |
| 3499 | 3499 |
| 3500 return code; | 3500 return code; |
| 3501 } | 3501 } |
| 3502 | 3502 |
| 3503 } // namespace compiler | 3503 } // namespace compiler |
| 3504 } // namespace internal | 3504 } // namespace internal |
| 3505 } // namespace v8 | 3505 } // namespace v8 |
| OLD | NEW |