Revision: 16607
Author: [email protected]
Date: Tue Sep 10 10:53:33 2013 UTC
Log: Move Maybe template into v8.h so it can be used by
SetResourceConstraints
BUG=
[email protected]
Review URL: https://codereview.chromium.org/23767009
Patch from Ross McIlroy <[email protected]>.
http://code.google.com/p/v8/source/detail?r=16607
Modified:
/branches/bleeding_edge/include/v8.h
/branches/bleeding_edge/src/globals.h
=======================================
--- /branches/bleeding_edge/include/v8.h Tue Sep 10 09:24:53 2013 UTC
+++ /branches/bleeding_edge/include/v8.h Tue Sep 10 10:53:33 2013 UTC
@@ -817,6 +817,21 @@
};
+/**
+ * A simple Maybe type, representing an object which may or may not have a
+ * value.
+ */
+template<class T>
+struct Maybe {
+ Maybe() : has_value(false) {}
+ explicit Maybe(T t) : has_value(true), value(t) {}
+ Maybe(bool has, T t) : has_value(has), value(t) {}
+
+ bool has_value;
+ T value;
+};
+
+
// --- Special objects ---
=======================================
--- /branches/bleeding_edge/src/globals.h Tue Aug 27 14:16:34 2013 UTC
+++ /branches/bleeding_edge/src/globals.h Tue Sep 10 10:53:33 2013 UTC
@@ -393,18 +393,6 @@
};
-// A simple Maybe type, that can be passed by value.
-template<class T>
-struct Maybe {
- Maybe() : has_value(false) {}
- explicit Maybe(T t) : has_value(true), value(t) {}
- Maybe(bool has, T t) : has_value(has), value(t) {}
-
- bool has_value;
- T value;
-};
-
-
// The Strict Mode (ECMA-262 5th edition, 4.2.2).
//
// This flag is used in the backend to represent the language mode. So far
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.