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/compiler/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/address-map.h" | 9 #include "src/address-map.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1853 ProcessInput(node, 0, UseInfo::TruncatingFloat64()); | 1853 ProcessInput(node, 0, UseInfo::TruncatingFloat64()); |
1854 ProcessRemainingInputs(node, 1); | 1854 ProcessRemainingInputs(node, 1); |
1855 SetOutput(node, MachineRepresentation::kFloat64); | 1855 SetOutput(node, MachineRepresentation::kFloat64); |
1856 if (truncation.TruncatesToFloat64() && | 1856 if (truncation.TruncatesToFloat64() && |
1857 mode == CheckFloat64HoleMode::kAllowReturnHole) { | 1857 mode == CheckFloat64HoleMode::kAllowReturnHole) { |
1858 if (lower()) DeferReplacement(node, node->InputAt(0)); | 1858 if (lower()) DeferReplacement(node, node->InputAt(0)); |
1859 } | 1859 } |
1860 return; | 1860 return; |
1861 } | 1861 } |
1862 case IrOpcode::kCheckTaggedHole: { | 1862 case IrOpcode::kCheckTaggedHole: { |
1863 ProcessInput(node, 0, UseInfo::AnyTagged()); | 1863 CheckTaggedHoleMode mode = CheckTaggedHoleModeOf(node->op()); |
1864 ProcessRemainingInputs(node, 1); | 1864 if (truncation.TruncatesToWord32() && |
1865 SetOutput(node, MachineRepresentation::kTagged); | 1865 mode == CheckTaggedHoleMode::kConvertHoleToUndefined) { |
| 1866 ProcessInput(node, 0, UseInfo::CheckedSigned32AsWord32()); |
| 1867 ProcessRemainingInputs(node, 1); |
| 1868 SetOutput(node, MachineRepresentation::kWord32); |
| 1869 if (lower()) DeferReplacement(node, node->InputAt(0)); |
| 1870 } else { |
| 1871 ProcessInput(node, 0, UseInfo::AnyTagged()); |
| 1872 ProcessRemainingInputs(node, 1); |
| 1873 SetOutput(node, MachineRepresentation::kTagged); |
| 1874 } |
1866 return; | 1875 return; |
1867 } | 1876 } |
1868 | 1877 |
1869 //------------------------------------------------------------------ | 1878 //------------------------------------------------------------------ |
1870 // Machine-level operators. | 1879 // Machine-level operators. |
1871 //------------------------------------------------------------------ | 1880 //------------------------------------------------------------------ |
1872 case IrOpcode::kLoad: { | 1881 case IrOpcode::kLoad: { |
1873 // TODO(jarin) Eventually, we should get rid of all machine stores | 1882 // TODO(jarin) Eventually, we should get rid of all machine stores |
1874 // from the high-level phases, then this becomes UNREACHABLE. | 1883 // from the high-level phases, then this becomes UNREACHABLE. |
1875 LoadRepresentation rep = LoadRepresentationOf(node->op()); | 1884 LoadRepresentation rep = LoadRepresentationOf(node->op()); |
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3056 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3065 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
3057 Operator::kNoProperties); | 3066 Operator::kNoProperties); |
3058 to_number_operator_.set(common()->Call(desc)); | 3067 to_number_operator_.set(common()->Call(desc)); |
3059 } | 3068 } |
3060 return to_number_operator_.get(); | 3069 return to_number_operator_.get(); |
3061 } | 3070 } |
3062 | 3071 |
3063 } // namespace compiler | 3072 } // namespace compiler |
3064 } // namespace internal | 3073 } // namespace internal |
3065 } // namespace v8 | 3074 } // namespace v8 |
OLD | NEW |