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

Unified Diff: src/compiler/js-inlining.h

Issue 453833003: Add initial support for inlining. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add initial support for inlining. Created 6 years, 4 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-inlining.h
diff --git a/src/compiler/js-context-specialization.h b/src/compiler/js-inlining.h
similarity index 50%
copy from src/compiler/js-context-specialization.h
copy to src/compiler/js-inlining.h
index b8b50ed6c36a1dbbf0f2a575892e8328c4500f36..8db66c32fbfd65efc16ef54d5e01888d8b13fc51 100644
--- a/src/compiler/js-context-specialization.h
+++ b/src/compiler/js-inlining.h
@@ -2,8 +2,8 @@
// 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_
+#ifndef V8_COMPILER_JS_INLINING_H_
+#define V8_COMPILER_JS_INLINING_H_
#include "src/compiler/graph-reducer.h"
#include "src/compiler/js-graph.h"
@@ -14,24 +14,24 @@ namespace v8 {
namespace internal {
namespace compiler {
-// Specializes a given JSGraph to a given context, potentially constant folding
-// some {LoadContext} nodes or strength reducing some {StoreContext} nodes.
-class JSContextSpecializer {
+class JSInliner {
public:
- JSContextSpecializer(CompilationInfo* info, JSGraph* jsgraph, Node* context)
+ JSInliner(CompilationInfo* info, JSGraph* jsgraph, Node* context)
: info_(info), jsgraph_(jsgraph), context_(context) {}
- void SpecializeToContext();
- Reduction ReduceJSLoadContext(Node* node);
- Reduction ReduceJSStoreContext(Node* node);
+ void Inline();
private:
+ friend class InlinerVisitor;
CompilationInfo* info_;
JSGraph* jsgraph_;
Node* context_;
+
+ void InlineCall(Node* node);
+ static void UnifyReturn(JSGraph* graph);
};
}
}
} // namespace v8::internal::compiler
-#endif // V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_
+#endif // V8_COMPILER_JS_INLINING_H_

Powered by Google App Engine
This is Rietveld 408576698