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

Unified Diff: include/v8.h

Issue 71163006: Merge bleeding_edge r17376:17693. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Fix all.gyp Created 7 years, 1 month 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 | « build/toolchain.gypi ('k') | include/v8config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 44a74ed5fea97282ce307cafd3d88df161da1adc..f8ef7c1fc4b66cfc532f61505f150d01d9b60a86 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -114,6 +114,7 @@ class String;
class StringObject;
class Symbol;
class SymbolObject;
+class Private;
class Uint32;
class Utils;
class Value;
@@ -328,6 +329,8 @@ template <class T> class Handle {
friend Handle<Boolean> False(Isolate* isolate);
friend class Context;
friend class HandleScope;
+ friend class Object;
+ friend class Private;
V8_INLINE static Handle<T> New(Isolate* isolate, T* that);
@@ -1926,11 +1929,9 @@ class V8_EXPORT Symbol : public Primitive {
// Returns the print name string of the symbol, or undefined if none.
Local<Value> Name() const;
- // Create a symbol without a print name.
- static Local<Symbol> New(Isolate* isolate);
-
- // Create a symbol with a print name.
- static Local<Symbol> New(Isolate *isolate, const char* data, int length = -1);
+ // Create a symbol. If data is not NULL, it will be used as a print name.
+ static Local<Symbol> New(
+ Isolate *isolate, const char* data = NULL, int length = -1);
V8_INLINE static Symbol* Cast(v8::Value* obj);
private:
@@ -1940,6 +1941,25 @@ class V8_EXPORT Symbol : public Primitive {
/**
+ * A private symbol
+ *
+ * This is an experimental feature. Use at your own risk.
+ */
+class V8_EXPORT Private : public Data {
+ public:
+ // Returns the print name string of the private symbol, or undefined if none.
+ Local<Value> Name() const;
+
+ // Create a private symbol. If data is not NULL, it will be the print name.
+ static Local<Private> New(
+ Isolate *isolate, const char* data = NULL, int length = -1);
+
+ private:
+ Private();
+};
+
+
+/**
* A JavaScript number value (ECMA-262, 4.3.20)
*/
class V8_EXPORT Number : public Primitive {
@@ -2109,6 +2129,17 @@ class V8_EXPORT Object : public Value {
AccessControl settings = DEFAULT);
/**
+ * Functionality for private properties.
+ * This is an experimental feature, use at your own risk.
+ * Note: Private properties are inherited. Do not rely on this, since it may
+ * change.
+ */
+ bool HasPrivate(Handle<Private> key);
+ bool SetPrivate(Handle<Private> key, Handle<Value> value);
+ bool DeletePrivate(Handle<Private> key);
+ Local<Value> GetPrivate(Handle<Private> key);
+
+ /**
* Returns an array containing the names of the enumerable properties
* of this object, including properties from prototype objects. The
* array returned by this method contains the same values as would
@@ -3042,6 +3073,8 @@ class V8_EXPORT RegExp : public Object {
*/
class V8_EXPORT External : public Value {
public:
+ static Local<External> New(Isolate* isolate, void* value);
+ // Deprecated, do not use.
static Local<External> New(void* value);
V8_INLINE static External* Cast(Value* obj);
void* Value() const;
@@ -3788,10 +3821,16 @@ class V8_EXPORT ResourceConstraints {
};
+V8_DEPRECATED(
+ "Use SetResourceConstraints(isolate, constraints) instead",
+ bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints));
+
+
/**
- * Sets the given ResourceConstraints on the current isolate.
+ * Sets the given ResourceConstraints on the given Isolate.
*/
-bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints);
+bool V8_EXPORT SetResourceConstraints(Isolate* isolate,
+ ResourceConstraints* constraints);
// --- Exceptions ---
@@ -5408,7 +5447,7 @@ class Internals {
static const int kNullValueRootIndex = 7;
static const int kTrueValueRootIndex = 8;
static const int kFalseValueRootIndex = 9;
- static const int kEmptyStringRootIndex = 132;
+ static const int kEmptyStringRootIndex = 134;
static const int kNodeClassIdOffset = 1 * kApiPointerSize;
static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
@@ -5813,7 +5852,6 @@ void ReturnValue<T>::Set(int32_t i) {
template<typename T>
void ReturnValue<T>::Set(uint32_t i) {
TYPE_CHECK(T, Integer);
- typedef internal::Internals I;
// Can't simply use INT32_MAX here for whatever reason.
bool fits_into_int32_t = (i & (1U << 31)) == 0;
if (V8_LIKELY(fits_into_int32_t)) {
« no previous file with comments | « build/toolchain.gypi ('k') | include/v8config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698