Index: src/compiler/js-for-in-lowering.h |
diff --git a/src/compiler/js-for-in-lowering.h b/src/compiler/js-for-in-lowering.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c455119dfb58eebefd3a798aca429a900914f452 |
--- /dev/null |
+++ b/src/compiler/js-for-in-lowering.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2017 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef V8_COMPILER_JS_FOR_IN_LOWERING_H_ |
+#define V8_COMPILER_JS_FOR_IN_LOWERING_H_ |
+ |
+#include "src/compiler/graph-reducer.h" |
+ |
+namespace v8 { |
+namespace internal { |
+namespace compiler { |
+ |
+// Forward declarations. |
+class CommonOperatorBuilder; |
+class Graph; |
+class JSGraph; |
+class SimplifiedOperatorBuilder; |
+ |
+// Lowers for-in operators to simplified operators. |
+class JSForInLowering final : public NON_EXPORTED_BASE(AdvancedReducer) { |
+ public: |
+ JSForInLowering(Editor* editor, JSGraph* jsgraph) |
+ : AdvancedReducer(editor), jsgraph_(jsgraph) {} |
+ ~JSForInLowering() final {} |
+ |
+ Reduction Reduce(Node* node) final; |
+ |
+ private: |
+ Reduction ReduceJSForInHasOwnProperty(Node* node); |
+ Reduction ReduceJSForInLoadProperty(Node* node); |
+ Reduction ReduceJSForInNext(Node* node); |
+ Reduction ReduceJSForInPrepare(Node* node); |
+ |
+ CommonOperatorBuilder* common() const; |
+ Graph* graph() const; |
+ Isolate* isolate() const; |
+ JSGraph* jsgraph() const { return jsgraph_; } |
+ SimplifiedOperatorBuilder* simplified() const; |
+ |
+ JSGraph* const jsgraph_; |
+}; |
+ |
+} // namespace compiler |
+} // namespace internal |
+} // namespace v8 |
+ |
+#endif // V8_COMPILER_JS_FOR_IN_LOWERING_H_ |