Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: src/compiler/js-for-in-lowering.h

Issue 2763533002: [WIP] JSForInLowering and JSForInHasOwnProperty.
Patch Set: Hack around the issue with indices not being available always. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-call-reducer.cc ('k') | src/compiler/js-for-in-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « src/compiler/js-call-reducer.cc ('k') | src/compiler/js-for-in-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698