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/effect-control-linearizer.h" | 5 #include "src/compiler/effect-control-linearizer.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/access-builder.h" | 8 #include "src/compiler/access-builder.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1811 // For oddballs also contain the numeric value, let us just check that | 1811 // For oddballs also contain the numeric value, let us just check that |
1812 // we have an oddball here. | 1812 // we have an oddball here. |
1813 Node* efalse = effect; | 1813 Node* efalse = effect; |
1814 Node* instance_type = efalse = graph()->NewNode( | 1814 Node* instance_type = efalse = graph()->NewNode( |
1815 simplified()->LoadField(AccessBuilder::ForMapInstanceType()), | 1815 simplified()->LoadField(AccessBuilder::ForMapInstanceType()), |
1816 value_map, efalse, if_false); | 1816 value_map, efalse, if_false); |
1817 Node* check_oddball = | 1817 Node* check_oddball = |
1818 graph()->NewNode(machine()->Word32Equal(), instance_type, | 1818 graph()->NewNode(machine()->Word32Equal(), instance_type, |
1819 jsgraph()->Int32Constant(ODDBALL_TYPE)); | 1819 jsgraph()->Int32Constant(ODDBALL_TYPE)); |
1820 if_false = efalse = graph()->NewNode( | 1820 if_false = efalse = graph()->NewNode( |
1821 common()->DeoptimizeUnless( | 1821 common()->DeoptimizeUnless(DeoptimizeReason::kNotANumberOrOddball), |
1822 DeoptimizeReason::kNotAHeapNumberUndefinedBoolean), | |
1823 check_oddball, frame_state, efalse, if_false); | 1822 check_oddball, frame_state, efalse, if_false); |
1824 STATIC_ASSERT(HeapNumber::kValueOffset == Oddball::kToNumberRawOffset); | 1823 STATIC_ASSERT(HeapNumber::kValueOffset == Oddball::kToNumberRawOffset); |
1825 | 1824 |
1826 control = graph()->NewNode(common()->Merge(2), if_true, if_false); | 1825 control = graph()->NewNode(common()->Merge(2), if_true, if_false); |
1827 effect = graph()->NewNode(common()->EffectPhi(2), etrue, efalse, control); | 1826 effect = graph()->NewNode(common()->EffectPhi(2), etrue, efalse, control); |
1828 break; | 1827 break; |
1829 } | 1828 } |
1830 } | 1829 } |
1831 | 1830 |
1832 value = effect = graph()->NewNode( | 1831 value = effect = graph()->NewNode( |
(...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3643 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3642 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
3644 Operator::kEliminatable); | 3643 Operator::kEliminatable); |
3645 to_number_operator_.set(common()->Call(desc)); | 3644 to_number_operator_.set(common()->Call(desc)); |
3646 } | 3645 } |
3647 return to_number_operator_.get(); | 3646 return to_number_operator_.get(); |
3648 } | 3647 } |
3649 | 3648 |
3650 } // namespace compiler | 3649 } // namespace compiler |
3651 } // namespace internal | 3650 } // namespace internal |
3652 } // namespace v8 | 3651 } // namespace v8 |
OLD | NEW |