| 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
| 6 #include "src/compiler/change-lowering.h" | 6 #include "src/compiler/change-lowering.h" |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 #include "src/compiler/simplified-operator.h" | 10 #include "src/compiler/simplified-operator.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 JSOperatorBuilder javascript(zone()); | 38 JSOperatorBuilder javascript(zone()); |
| 39 JSGraph jsgraph(isolate(), graph(), common(), &javascript, &machine); | 39 JSGraph jsgraph(isolate(), graph(), common(), &javascript, &machine); |
| 40 ChangeLowering reducer(&jsgraph); | 40 ChangeLowering reducer(&jsgraph); |
| 41 return reducer.Reduce(node); | 41 return reducer.Reduce(node); |
| 42 } | 42 } |
| 43 | 43 |
| 44 SimplifiedOperatorBuilder* simplified() { return &simplified_; } | 44 SimplifiedOperatorBuilder* simplified() { return &simplified_; } |
| 45 | 45 |
| 46 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, | 46 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, |
| 47 const Matcher<Node*>& control_matcher) { | 47 const Matcher<Node*>& control_matcher) { |
| 48 return IsCall(_, IsHeapConstant(Unique<HeapObject>::CreateImmovable( | 48 return IsCall( |
| 49 AllocateHeapNumberStub(isolate()).GetCode())), | 49 _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()), |
| 50 IsNumberConstant(BitEq(0.0)), effect_matcher, | 50 IsNumberConstant(BitEq(0.0)), effect_matcher, control_matcher); |
| 51 control_matcher); | |
| 52 } | 51 } |
| 53 Matcher<Node*> IsChangeInt32ToSmi(const Matcher<Node*>& value_matcher) { | 52 Matcher<Node*> IsChangeInt32ToSmi(const Matcher<Node*>& value_matcher) { |
| 54 return Is64() ? IsWord64Shl(IsChangeInt32ToInt64(value_matcher), | 53 return Is64() ? IsWord64Shl(IsChangeInt32ToInt64(value_matcher), |
| 55 IsSmiShiftBitsConstant()) | 54 IsSmiShiftBitsConstant()) |
| 56 : IsWord32Shl(value_matcher, IsSmiShiftBitsConstant()); | 55 : IsWord32Shl(value_matcher, IsSmiShiftBitsConstant()); |
| 57 } | 56 } |
| 58 Matcher<Node*> IsChangeSmiToInt32(const Matcher<Node*>& value_matcher) { | 57 Matcher<Node*> IsChangeSmiToInt32(const Matcher<Node*>& value_matcher) { |
| 59 return Is64() ? IsTruncateInt64ToInt32( | 58 return Is64() ? IsTruncateInt64ToInt32( |
| 60 IsWord64Sar(value_matcher, IsSmiShiftBitsConstant())) | 59 IsWord64Sar(value_matcher, IsSmiShiftBitsConstant())) |
| 61 : IsWord32Sar(value_matcher, IsSmiShiftBitsConstant()); | 60 : IsWord32Sar(value_matcher, IsSmiShiftBitsConstant()); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 CaptureEq(&branch), | 455 CaptureEq(&branch), |
| 457 IsBranch(IsUint32LessThanOrEqual( | 456 IsBranch(IsUint32LessThanOrEqual( |
| 458 value, IsInt32Constant(Smi::kMaxValue)), | 457 value, IsInt32Constant(Smi::kMaxValue)), |
| 459 graph()->start()))), | 458 graph()->start()))), |
| 460 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); | 459 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); |
| 461 } | 460 } |
| 462 | 461 |
| 463 } // namespace compiler | 462 } // namespace compiler |
| 464 } // namespace internal | 463 } // namespace internal |
| 465 } // namespace v8 | 464 } // namespace v8 |
| OLD | NEW |