| 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 value = graph()->NewNode(common()->Phi(MachineRepresentation::kBit, 2), vtrue, | 832 value = graph()->NewNode(common()->Phi(MachineRepresentation::kBit, 2), vtrue, |
| 833 vfalse, control); | 833 vfalse, control); |
| 834 | 834 |
| 835 return ValueEffectControl(value, effect, control); | 835 return ValueEffectControl(value, effect, control); |
| 836 } | 836 } |
| 837 | 837 |
| 838 EffectControlLinearizer::ValueEffectControl | 838 EffectControlLinearizer::ValueEffectControl |
| 839 EffectControlLinearizer::AllocateHeapNumberWithValue(Node* value, Node* effect, | 839 EffectControlLinearizer::AllocateHeapNumberWithValue(Node* value, Node* effect, |
| 840 Node* control) { | 840 Node* control) { |
| 841 effect = graph()->NewNode(common()->BeginRegion(), effect); | 841 effect = graph()->NewNode(common()->BeginRegion(), effect); |
| 842 Node* result = effect = | 842 Node* result = effect = graph()->NewNode( |
| 843 graph()->NewNode(simplified()->Allocate(NOT_TENURED), | 843 simplified()->Allocate(NOT_TENURED), |
| 844 jsgraph()->Constant(HeapNumber::kSize), effect, control); | 844 jsgraph()->Int32Constant(HeapNumber::kSize), effect, control); |
| 845 effect = graph()->NewNode(simplified()->StoreField(AccessBuilder::ForMap()), | 845 effect = graph()->NewNode(simplified()->StoreField(AccessBuilder::ForMap()), |
| 846 result, jsgraph()->HeapNumberMapConstant(), effect, | 846 result, jsgraph()->HeapNumberMapConstant(), effect, |
| 847 control); | 847 control); |
| 848 effect = graph()->NewNode( | 848 effect = graph()->NewNode( |
| 849 simplified()->StoreField(AccessBuilder::ForHeapNumberValue()), result, | 849 simplified()->StoreField(AccessBuilder::ForHeapNumberValue()), result, |
| 850 value, effect, control); | 850 value, effect, control); |
| 851 result = effect = graph()->NewNode(common()->FinishRegion(), result, effect); | 851 result = effect = graph()->NewNode(common()->FinishRegion(), result, effect); |
| 852 return ValueEffectControl(result, effect, control); | 852 return ValueEffectControl(result, effect, control); |
| 853 } | 853 } |
| 854 | 854 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 878 return jsgraph()->Int32Constant(Smi::kMaxValue); | 878 return jsgraph()->Int32Constant(Smi::kMaxValue); |
| 879 } | 879 } |
| 880 | 880 |
| 881 Node* EffectControlLinearizer::SmiShiftBitsConstant() { | 881 Node* EffectControlLinearizer::SmiShiftBitsConstant() { |
| 882 return jsgraph()->IntPtrConstant(kSmiShiftSize + kSmiTagSize); | 882 return jsgraph()->IntPtrConstant(kSmiShiftSize + kSmiTagSize); |
| 883 } | 883 } |
| 884 | 884 |
| 885 } // namespace compiler | 885 } // namespace compiler |
| 886 } // namespace internal | 886 } // namespace internal |
| 887 } // namespace v8 | 887 } // namespace v8 |
| OLD | NEW |