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/escape-analysis.h" | 5 #include "src/compiler/escape-analysis.h" |
6 #include "src/bit-vector.h" | 6 #include "src/bit-vector.h" |
7 #include "src/compiler/escape-analysis-reducer.h" | 7 #include "src/compiler/escape-analysis-reducer.h" |
8 #include "src/compiler/graph-visualizer.h" | 8 #include "src/compiler/graph-visualizer.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 return effect_ = graph()->NewNode(common()->FinishRegion(), value, effect); | 59 return effect_ = graph()->NewNode(common()->FinishRegion(), value, effect); |
60 } | 60 } |
61 | 61 |
62 Node* Allocate(Node* size, Node* effect = nullptr, Node* control = nullptr) { | 62 Node* Allocate(Node* size, Node* effect = nullptr, Node* control = nullptr) { |
63 if (!effect) { | 63 if (!effect) { |
64 effect = effect_; | 64 effect = effect_; |
65 } | 65 } |
66 if (!control) { | 66 if (!control) { |
67 control = control_; | 67 control = control_; |
68 } | 68 } |
69 return effect_ = graph()->NewNode(simplified()->Allocate(), size, effect, | 69 return effect_ = graph()->NewNode(simplified()->Allocate(Type::Any()), size, |
70 control); | 70 effect, control); |
71 } | 71 } |
72 | 72 |
73 Node* Constant(int num) { | 73 Node* Constant(int num) { |
74 return graph()->NewNode(common()->NumberConstant(num)); | 74 return graph()->NewNode(common()->NumberConstant(num)); |
75 } | 75 } |
76 | 76 |
77 Node* Store(const FieldAccess& access, Node* allocation, Node* value, | 77 Node* Store(const FieldAccess& access, Node* allocation, Node* value, |
78 Node* effect = nullptr, Node* control = nullptr) { | 78 Node* effect = nullptr, Node* control = nullptr) { |
79 if (!effect) { | 79 if (!effect) { |
80 effect = effect_; | 80 effect = effect_; |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 ASSERT_EQ(object1, NodeProperties::GetValueInput(object_state, 0)); | 514 ASSERT_EQ(object1, NodeProperties::GetValueInput(object_state, 0)); |
515 ASSERT_EQ(object_state, NodeProperties::GetValueInput(object_state, 1)); | 515 ASSERT_EQ(object_state, NodeProperties::GetValueInput(object_state, 1)); |
516 | 516 |
517 Node* object_state2 = NodeProperties::GetValueInput(state_values1, 0); | 517 Node* object_state2 = NodeProperties::GetValueInput(state_values1, 0); |
518 ASSERT_EQ(object_state, object_state2); | 518 ASSERT_EQ(object_state, object_state2); |
519 } | 519 } |
520 | 520 |
521 } // namespace compiler | 521 } // namespace compiler |
522 } // namespace internal | 522 } // namespace internal |
523 } // namespace v8 | 523 } // namespace v8 |
OLD | NEW |