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

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

Issue 1391903002: [turbofan] Separate JSInliningHeuristic into own class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 2 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-inlining.cc ('k') | src/compiler/js-inlining-heuristic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining-heuristic.h
diff --git a/src/compiler/js-inlining-heuristic.h b/src/compiler/js-inlining-heuristic.h
new file mode 100644
index 0000000000000000000000000000000000000000..9499e1f8c756b5b6c5b29637ae67713c3c9e1978
--- /dev/null
+++ b/src/compiler/js-inlining-heuristic.h
@@ -0,0 +1,34 @@
+// Copyright 2015 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_INLINING_HEURISTIC_H_
+#define V8_COMPILER_JS_INLINING_HEURISTIC_H_
+
+#include "src/compiler/js-inlining.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class JSInliningHeuristic final : public AdvancedReducer {
+ public:
+ enum Mode { kRestrictedInlining, kGeneralInlining };
+ JSInliningHeuristic(Editor* editor, Mode mode, Zone* local_zone,
+ CompilationInfo* info, JSGraph* jsgraph)
+ : AdvancedReducer(editor),
+ mode_(mode),
+ inliner_(editor, local_zone, info, jsgraph) {}
+
+ Reduction Reduce(Node* node) final;
+
+ private:
+ Mode const mode_;
+ JSInliner inliner_;
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_JS_INLINING_HEURISTIC_H_
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/js-inlining-heuristic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698