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 #ifndef V8_COMPILER_JS_TYPED_LOWERING_H_ | 5 #ifndef V8_COMPILER_JS_TYPED_LOWERING_H_ |
6 #define V8_COMPILER_JS_TYPED_LOWERING_H_ | 6 #define V8_COMPILER_JS_TYPED_LOWERING_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 // Forward declarations. | 15 // Forward declarations. |
16 class CompilationDependencies; | 16 class CompilationDependencies; |
17 class Factory; | 17 class Factory; |
| 18 class TypeCache; |
18 | 19 |
19 | 20 |
20 namespace compiler { | 21 namespace compiler { |
21 | 22 |
22 // Forward declarations. | 23 // Forward declarations. |
23 class CommonOperatorBuilder; | 24 class CommonOperatorBuilder; |
24 class JSGraph; | 25 class JSGraph; |
25 class JSOperatorBuilder; | 26 class JSOperatorBuilder; |
26 class MachineOperatorBuilder; | 27 class MachineOperatorBuilder; |
27 class SimplifiedOperatorBuilder; | 28 class SimplifiedOperatorBuilder; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 Reduction ReduceJSCreateBlockContext(Node* node); | 80 Reduction ReduceJSCreateBlockContext(Node* node); |
80 Reduction ReduceJSCallFunction(Node* node); | 81 Reduction ReduceJSCallFunction(Node* node); |
81 Reduction ReduceJSForInDone(Node* node); | 82 Reduction ReduceJSForInDone(Node* node); |
82 Reduction ReduceJSForInNext(Node* node); | 83 Reduction ReduceJSForInNext(Node* node); |
83 Reduction ReduceJSForInPrepare(Node* node); | 84 Reduction ReduceJSForInPrepare(Node* node); |
84 Reduction ReduceJSForInStep(Node* node); | 85 Reduction ReduceJSForInStep(Node* node); |
85 Reduction ReduceNumberBinop(Node* node, const Operator* numberOp); | 86 Reduction ReduceNumberBinop(Node* node, const Operator* numberOp); |
86 Reduction ReduceInt32Binop(Node* node, const Operator* intOp); | 87 Reduction ReduceInt32Binop(Node* node, const Operator* intOp); |
87 Reduction ReduceUI32Shift(Node* node, Signedness left_signedness, | 88 Reduction ReduceUI32Shift(Node* node, Signedness left_signedness, |
88 const Operator* shift_op); | 89 const Operator* shift_op); |
| 90 Reduction ReduceNewArray(Node* node, Node* length, int capacity, |
| 91 Handle<AllocationSite> site); |
89 | 92 |
90 Node* Word32Shl(Node* const lhs, int32_t const rhs); | 93 Node* Word32Shl(Node* const lhs, int32_t const rhs); |
91 Node* AllocateArguments(Node* effect, Node* control, Node* frame_state); | 94 Node* AllocateArguments(Node* effect, Node* control, Node* frame_state); |
92 Node* AllocateAliasedArguments(Node* effect, Node* control, Node* frame_state, | 95 Node* AllocateAliasedArguments(Node* effect, Node* control, Node* frame_state, |
93 Node* context, Handle<SharedFunctionInfo>, | 96 Node* context, Handle<SharedFunctionInfo>, |
94 bool* has_aliased_arguments); | 97 bool* has_aliased_arguments); |
| 98 Node* AllocateElements(Node* effect, Node* control, |
| 99 ElementsKind elements_kind, int capacity, |
| 100 PretenureFlag pretenure); |
95 | 101 |
96 Factory* factory() const; | 102 Factory* factory() const; |
97 Graph* graph() const; | 103 Graph* graph() const; |
98 JSGraph* jsgraph() const { return jsgraph_; } | 104 JSGraph* jsgraph() const { return jsgraph_; } |
99 Isolate* isolate() const; | 105 Isolate* isolate() const; |
100 JSOperatorBuilder* javascript() const; | 106 JSOperatorBuilder* javascript() const; |
101 CommonOperatorBuilder* common() const; | 107 CommonOperatorBuilder* common() const; |
102 SimplifiedOperatorBuilder* simplified() const; | 108 SimplifiedOperatorBuilder* simplified() const; |
103 MachineOperatorBuilder* machine() const; | 109 MachineOperatorBuilder* machine() const; |
104 CompilationDependencies* dependencies() const; | 110 CompilationDependencies* dependencies() const; |
105 Flags flags() const { return flags_; } | 111 Flags flags() const { return flags_; } |
106 | 112 |
107 // Limits up to which context allocations are inlined. | 113 // Limits up to which context allocations are inlined. |
108 static const int kFunctionContextAllocationLimit = 16; | 114 static const int kFunctionContextAllocationLimit = 16; |
109 static const int kBlockContextAllocationLimit = 16; | 115 static const int kBlockContextAllocationLimit = 16; |
110 | 116 |
111 CompilationDependencies* dependencies_; | 117 CompilationDependencies* dependencies_; |
112 Flags flags_; | 118 Flags flags_; |
113 JSGraph* jsgraph_; | 119 JSGraph* jsgraph_; |
114 Type* shifted_int32_ranges_[4]; | 120 Type* shifted_int32_ranges_[4]; |
| 121 TypeCache const& type_cache_; |
115 }; | 122 }; |
116 | 123 |
117 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) | 124 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) |
118 | 125 |
119 } // namespace compiler | 126 } // namespace compiler |
120 } // namespace internal | 127 } // namespace internal |
121 } // namespace v8 | 128 } // namespace v8 |
122 | 129 |
123 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ | 130 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ |
OLD | NEW |