OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_ | |
Benedikt Meurer
2016/04/18 04:34:18
Please rename to effect-control-linearization.h/.c
| |
6 #define V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_ | |
7 | |
8 #include "src/compiler/common-operator.h" | |
9 #include "src/compiler/node.h" | |
10 #include "src/compiler/simplified-operator.h" | |
11 | |
12 namespace v8 { | |
13 namespace internal { | |
14 | |
15 class Zone; | |
16 | |
17 namespace compiler { | |
18 | |
19 class CommonOperatorBuilder; | |
20 class SimplifiedOperatorBuilder; | |
21 class MachineOperatorBuilder; | |
22 class JSGraph; | |
23 class Graph; | |
24 class Schedule; | |
25 | |
26 class EffectControlLinearizer { | |
Benedikt Meurer
2016/04/18 04:34:18
Please rename to EffectControlLinearization to mat
| |
27 public: | |
28 EffectControlLinearizer(JSGraph* graph, Schedule* schedule, Zone* temp_zone); | |
29 | |
30 void Run(); | |
31 | |
32 private: | |
33 void ProcessNode(Node* node, Node** current_effect, Node** control); | |
34 | |
35 struct ValueEffectControl { | |
36 Node* value; | |
37 Node* effect; | |
38 Node* control; | |
39 ValueEffectControl(Node* value, Node* effect, Node* control) | |
40 : value(value), effect(effect), control(control) {} | |
41 }; | |
42 | |
43 bool TryWireInStateEffect(Node* node, Node** effect, Node** control); | |
44 ValueEffectControl LowerChangeInt32ToTagged(Node* node, Node* effect, | |
45 Node* control); | |
46 ValueEffectControl LowerChangeUint32ToTagged(Node* node, Node* effect, | |
47 Node* control); | |
48 ValueEffectControl LowerChangeFloat64ToTagged(Node* node, Node* effect, | |
49 Node* control); | |
50 ValueEffectControl AllocateHeapNumberWithValue(Node* node, Node* effect, | |
51 Node* control); | |
52 | |
53 Node* ChangeInt32ToSmi(Node* value); | |
54 Node* ChangeUint32ToSmi(Node* value); | |
55 Node* ChangeInt32ToFloat64(Node* value); | |
56 Node* ChangeUint32ToFloat64(Node* value); | |
57 | |
58 Node* HeapNumberValueIndexConstant(); | |
59 Node* SmiMaxValueConstant(); | |
60 Node* SmiShiftBitsConstant(); | |
61 | |
62 JSGraph* jsgraph() const { return js_graph_; } | |
63 Graph* graph() const; | |
64 Schedule* schedule() const { return schedule_; } | |
65 Zone* temp_zone() const { return temp_zone_; } | |
66 CommonOperatorBuilder* common() const; | |
67 SimplifiedOperatorBuilder* simplified() const; | |
68 MachineOperatorBuilder* machine() const; | |
69 | |
70 JSGraph* js_graph_; | |
71 Schedule* schedule_; | |
72 Zone* temp_zone_; | |
73 SetOncePointer<const Operator> allocate_heap_number_operator_; | |
74 }; | |
75 | |
76 } // namespace compiler | |
77 } // namespace internal | |
78 } // namespace v8 | |
79 | |
80 #endif // V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_ | |
OLD | NEW |