OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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_JS_FOR_IN_LOWERING_H_ |
| 6 #define V8_COMPILER_JS_FOR_IN_LOWERING_H_ |
| 7 |
| 8 #include "src/compiler/graph-reducer.h" |
| 9 |
| 10 namespace v8 { |
| 11 namespace internal { |
| 12 namespace compiler { |
| 13 |
| 14 // Forward declarations. |
| 15 class CommonOperatorBuilder; |
| 16 class Graph; |
| 17 class JSGraph; |
| 18 class SimplifiedOperatorBuilder; |
| 19 |
| 20 // Lowers for-in operators to simplified operators. |
| 21 class JSForInLowering final : public NON_EXPORTED_BASE(AdvancedReducer) { |
| 22 public: |
| 23 JSForInLowering(Editor* editor, JSGraph* jsgraph) |
| 24 : AdvancedReducer(editor), jsgraph_(jsgraph) {} |
| 25 ~JSForInLowering() final {} |
| 26 |
| 27 Reduction Reduce(Node* node) final; |
| 28 |
| 29 private: |
| 30 Reduction ReduceJSForInHasOwnProperty(Node* node); |
| 31 Reduction ReduceJSForInLoadProperty(Node* node); |
| 32 Reduction ReduceJSForInNext(Node* node); |
| 33 Reduction ReduceJSForInPrepare(Node* node); |
| 34 |
| 35 CommonOperatorBuilder* common() const; |
| 36 Graph* graph() const; |
| 37 Isolate* isolate() const; |
| 38 JSGraph* jsgraph() const { return jsgraph_; } |
| 39 SimplifiedOperatorBuilder* simplified() const; |
| 40 |
| 41 JSGraph* const jsgraph_; |
| 42 }; |
| 43 |
| 44 } // namespace compiler |
| 45 } // namespace internal |
| 46 } // namespace v8 |
| 47 |
| 48 #endif // V8_COMPILER_JS_FOR_IN_LOWERING_H_ |
OLD | NEW |