Chromium Code Reviews| 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 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1803 node->InsertInput(jsgraph_->zone(), 0, | 1803 node->InsertInput(jsgraph_->zone(), 0, |
| 1804 jsgraph_->HeapConstant(callable.code())); | 1804 jsgraph_->HeapConstant(callable.code())); |
| 1805 node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant()); | 1805 node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant()); |
| 1806 node->AppendInput(jsgraph_->zone(), jsgraph_->graph()->start()); | 1806 node->AppendInput(jsgraph_->zone(), jsgraph_->graph()->start()); |
| 1807 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); | 1807 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); |
| 1808 } | 1808 } |
| 1809 return; | 1809 return; |
| 1810 } | 1810 } |
| 1811 | 1811 |
| 1812 case IrOpcode::kCheckBounds: { | 1812 case IrOpcode::kCheckBounds: { |
| 1813 VisitBinop(node, UseInfo::CheckedSigned32AsWord32(), | 1813 if (BothInputsAreUnsigned32(node)) { |
|
Jarin
2016/07/11 12:31:58
Is not it sufficient to check that the first input
Benedikt Meurer
2016/07/11 12:52:00
Done, thanks.
| |
| 1814 UseInfo::TruncatingWord32(), MachineRepresentation::kWord32); | 1814 VisitBinop(node, UseInfo::TruncatingWord32(), |
| 1815 MachineRepresentation::kWord32); | |
| 1816 } else { | |
| 1817 VisitBinop(node, UseInfo::CheckedSigned32AsWord32(), | |
| 1818 UseInfo::TruncatingWord32(), | |
| 1819 MachineRepresentation::kWord32); | |
| 1820 } | |
| 1815 return; | 1821 return; |
| 1816 } | 1822 } |
| 1817 case IrOpcode::kCheckIf: { | 1823 case IrOpcode::kCheckIf: { |
| 1818 ProcessInput(node, 0, UseInfo::Bool()); | 1824 ProcessInput(node, 0, UseInfo::Bool()); |
| 1819 ProcessRemainingInputs(node, 1); | 1825 ProcessRemainingInputs(node, 1); |
| 1820 SetOutput(node, MachineRepresentation::kNone); | 1826 SetOutput(node, MachineRepresentation::kNone); |
| 1821 return; | 1827 return; |
| 1822 } | 1828 } |
| 1823 case IrOpcode::kCheckNumber: { | 1829 case IrOpcode::kCheckNumber: { |
| 1824 if (InputIs(node, Type::Number())) { | 1830 if (InputIs(node, Type::Number())) { |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3282 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3288 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
| 3283 Operator::kNoProperties); | 3289 Operator::kNoProperties); |
| 3284 to_number_operator_.set(common()->Call(desc)); | 3290 to_number_operator_.set(common()->Call(desc)); |
| 3285 } | 3291 } |
| 3286 return to_number_operator_.get(); | 3292 return to_number_operator_.get(); |
| 3287 } | 3293 } |
| 3288 | 3294 |
| 3289 } // namespace compiler | 3295 } // namespace compiler |
| 3290 } // namespace internal | 3296 } // namespace internal |
| 3291 } // namespace v8 | 3297 } // namespace v8 |
| OLD | NEW |