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

Unified Diff: src/compiler/js-intrinsic-builder.h

Issue 612043003: Add inlining for intrinsics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix windows conversion warning. Created 6 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
Index: src/compiler/js-intrinsic-builder.h
diff --git a/src/compiler/js-intrinsic-builder.h b/src/compiler/js-intrinsic-builder.h
new file mode 100644
index 0000000000000000000000000000000000000000..1eae949a4482377de707a18b946963eaec30e76d
--- /dev/null
+++ b/src/compiler/js-intrinsic-builder.h
@@ -0,0 +1,39 @@
+// 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_INTRINSIC_BUILDER_H_
+#define V8_COMPILER_JS_INTRINSIC_BUILDER_H_
+
+#include "src/compiler/js-graph.h"
+#include "src/v8.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class JSIntrinsicBuilder {
+ public:
+ explicit JSIntrinsicBuilder(JSGraph* jsgraph) : jsgraph_(jsgraph) {}
+
+ std::pair<Node*, Node*> BuildGraphFor(Runtime::FunctionId id,
Michael Starzinger 2014/10/15 08:44:59 Can we add a typedef for this pair?
sigurds 2014/10/15 12:39:35 Done.
+ const NodeVector& arguments);
+
+ std::pair<Node*, Node*> BuildGraphFor_IsSmi(const NodeVector& arguments);
Michael Starzinger 2014/10/15 08:44:59 Can we make the dispatched methods private and onl
sigurds 2014/10/15 12:39:35 Done.
+ std::pair<Node*, Node*> BuildGraphFor_IsNonNegativeSmi(
+ const NodeVector& arguments);
+ std::pair<Node*, Node*> BuildGraphFor_ValueOf(const NodeVector& arguments);
+
+ private:
+ std::pair<Node*, Node*> BuildMapCheck(Node* object, Node* effect,
+ InstanceType map_type);
+
+ Graph* graph() const { return jsgraph_->graph(); }
+ CommonOperatorBuilder* common() const { return jsgraph_->common(); }
+ JSGraph* jsgraph_;
+};
+}
+}
+} // namespace v8::internal::compiler
+
+#endif // V8_COMPILER_JS_INTRINSIC_BUILDER_H_

Powered by Google App Engine
This is Rietveld 408576698