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

Unified Diff: src/compiler/js-context-specialization.h

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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
Index: src/compiler/js-context-specialization.h
diff --git a/src/compiler/js-context-specialization.h b/src/compiler/js-context-specialization.h
new file mode 100644
index 0000000000000000000000000000000000000000..33c1c46f3bd54ff3341217cf57ffeceb90b5f4f3
--- /dev/null
+++ b/src/compiler/js-context-specialization.h
@@ -0,0 +1,35 @@
+// Copyright 2014 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_CONTEXT_SPECIALIZATION_H_
+#define V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_
+
+#include "src/compiler/graph-reducer.h"
+#include "src/compiler/js-graph.h"
+#include "src/contexts.h"
+#include "src/v8.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+// Specializes a given JSGraph to a given context, potentially constant folding
+// some {LoadContext} nodes.
+class JSContextSpecializer {
+ public:
+ JSContextSpecializer(CompilationInfo* info, JSGraph* jsgraph, Node* context)
+ : info_(info), jsgraph_(jsgraph), context_(context) {}
+
+ void SpecializeToContext();
+ Reduction ReduceJSLoadContext(Node* node);
+
+ private:
+ CompilationInfo* info_;
+ JSGraph* jsgraph_;
+ Node* context_;
+};
+
+} } } // namespace v8::internal::compiler
+
+#endif // V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_

Powered by Google App Engine
This is Rietveld 408576698