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

Unified Diff: src/compiler/operator.h

Issue 539933002: [turbofan] Make sure Operator is really immutable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/node-matchers.h ('k') | src/compiler/operator-properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/operator.h
diff --git a/src/compiler/operator.h b/src/compiler/operator.h
index d0597522a05de8aa165098f197a40af38e6a0462..67f38ede43f162b4692624d480d9e1e730922438 100644
--- a/src/compiler/operator.h
+++ b/src/compiler/operator.h
@@ -269,6 +269,13 @@ class Operator1 : public Operator {
// Type definitions for operators with specific types of parameters.
typedef Operator1<PrintableUnique<Name> > NameOperator;
+
+// Helper to extract parameters from Operator1<*> operator.
+template <typename T>
+static inline T OpParameter(const Operator* op) {
+ return reinterpret_cast<const Operator1<T>*>(op)->parameter();
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/node-matchers.h ('k') | src/compiler/operator-properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698