v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 117 | skipping to change at line 117 | |||
class ObjectTemplate; | class ObjectTemplate; | |||
class Primitive; | class Primitive; | |||
class RawOperationDescriptor; | class RawOperationDescriptor; | |||
class Signature; | class Signature; | |||
class StackFrame; | class StackFrame; | |||
class StackTrace; | class StackTrace; | |||
class String; | class String; | |||
class StringObject; | class StringObject; | |||
class Symbol; | class Symbol; | |||
class SymbolObject; | class SymbolObject; | |||
class Private; | ||||
class Uint32; | class Uint32; | |||
class Utils; | class Utils; | |||
class Value; | class Value; | |||
template <class T> class Handle; | template <class T> class Handle; | |||
template <class T> class Local; | template <class T> class Local; | |||
template <class T> class Eternal; | template <class T> class Eternal; | |||
template<class T> class NonCopyablePersistentTraits; | template<class T> class NonCopyablePersistentTraits; | |||
template<class T, | template<class T, | |||
class M = NonCopyablePersistentTraits<T> > class Persistent; | class M = NonCopyablePersistentTraits<T> > class Persistent; | |||
template<class T, class P> class WeakCallbackObject; | template<class T, class P> class WeakCallbackObject; | |||
skipping to change at line 329 | skipping to change at line 330 | |||
template<class F> friend class Local; | template<class F> friend class Local; | |||
template<class F> friend class FunctionCallbackInfo; | template<class F> friend class FunctionCallbackInfo; | |||
template<class F> friend class PropertyCallbackInfo; | template<class F> friend class PropertyCallbackInfo; | |||
template<class F> friend class internal::CustomArguments; | template<class F> friend class internal::CustomArguments; | |||
friend Handle<Primitive> Undefined(Isolate* isolate); | friend Handle<Primitive> Undefined(Isolate* isolate); | |||
friend Handle<Primitive> Null(Isolate* isolate); | friend Handle<Primitive> Null(Isolate* isolate); | |||
friend Handle<Boolean> True(Isolate* isolate); | friend Handle<Boolean> True(Isolate* isolate); | |||
friend Handle<Boolean> False(Isolate* isolate); | friend Handle<Boolean> False(Isolate* isolate); | |||
friend class Context; | friend class Context; | |||
friend class HandleScope; | friend class HandleScope; | |||
friend class Object; | ||||
friend class Private; | ||||
V8_INLINE static Handle<T> New(Isolate* isolate, T* that); | V8_INLINE static Handle<T> New(Isolate* isolate, T* that); | |||
T* val_; | T* val_; | |||
}; | }; | |||
/** | /** | |||
* A light-weight stack-allocated object handle. All operations | * A light-weight stack-allocated object handle. All operations | |||
* that return objects from within v8 return them in local handles. They | * that return objects from within v8 return them in local handles. They | |||
* are created within HandleScopes, and all local handles allocated within a | * are created within HandleScopes, and all local handles allocated within a | |||
skipping to change at line 1901 | skipping to change at line 1904 | |||
/** | /** | |||
* A JavaScript symbol (ECMA-262 edition 6) | * A JavaScript symbol (ECMA-262 edition 6) | |||
* | * | |||
* This is an experimental feature. Use at your own risk. | * This is an experimental feature. Use at your own risk. | |||
*/ | */ | |||
class V8_EXPORT Symbol : public Primitive { | class V8_EXPORT Symbol : public Primitive { | |||
public: | public: | |||
// Returns the print name string of the symbol, or undefined if none. | // Returns the print name string of the symbol, or undefined if none. | |||
Local<Value> Name() const; | Local<Value> Name() const; | |||
// Create a symbol without a print name. | // Create a symbol. If data is not NULL, it will be used as a print name. | |||
static Local<Symbol> New(Isolate* isolate); | static Local<Symbol> New( | |||
Isolate *isolate, const char* data = NULL, int length = -1); | ||||
// Create a symbol with a print name. | ||||
static Local<Symbol> New(Isolate *isolate, const char* data, int length = | ||||
-1); | ||||
V8_INLINE static Symbol* Cast(v8::Value* obj); | V8_INLINE static Symbol* Cast(v8::Value* obj); | |||
private: | private: | |||
Symbol(); | Symbol(); | |||
static void CheckCast(v8::Value* obj); | static void CheckCast(v8::Value* obj); | |||
}; | }; | |||
/** | /** | |||
* 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 n | ||||
one. | ||||
Local<Value> Name() const; | ||||
// Create a private symbol. If data is not NULL, it will be the print nam | ||||
e. | ||||
static Local<Private> New( | ||||
Isolate *isolate, const char* data = NULL, int length = -1); | ||||
private: | ||||
Private(); | ||||
}; | ||||
/** | ||||
* A JavaScript number value (ECMA-262, 4.3.20) | * A JavaScript number value (ECMA-262, 4.3.20) | |||
*/ | */ | |||
class V8_EXPORT Number : public Primitive { | class V8_EXPORT Number : public Primitive { | |||
public: | public: | |||
double Value() const; | double Value() const; | |||
static Local<Number> New(double value); | static Local<Number> New(double value); | |||
static Local<Number> New(Isolate* isolate, double value); | static Local<Number> New(Isolate* isolate, double value); | |||
V8_INLINE static Number* Cast(v8::Value* obj); | V8_INLINE static Number* Cast(v8::Value* obj); | |||
private: | private: | |||
Number(); | Number(); | |||
skipping to change at line 2076 | skipping to change at line 2095 | |||
AccessControl settings = DEFAULT, | AccessControl settings = DEFAULT, | |||
PropertyAttribute attribute = None); | PropertyAttribute attribute = None); | |||
// This function is not yet stable and should not be used at this time. | // This function is not yet stable and should not be used at this time. | |||
bool SetDeclaredAccessor(Local<String> name, | bool SetDeclaredAccessor(Local<String> name, | |||
Local<DeclaredAccessorDescriptor> descriptor, | Local<DeclaredAccessorDescriptor> descriptor, | |||
PropertyAttribute attribute = None, | PropertyAttribute attribute = None, | |||
AccessControl settings = DEFAULT); | 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 | * Returns an array containing the names of the enumerable properties | |||
* of this object, including properties from prototype objects. The | * of this object, including properties from prototype objects. The | |||
* array returned by this method contains the same values as would | * array returned by this method contains the same values as would | |||
* be enumerated by a for-in statement over this object. | * be enumerated by a for-in statement over this object. | |||
*/ | */ | |||
Local<Array> GetPropertyNames(); | Local<Array> GetPropertyNames(); | |||
/** | /** | |||
* This function has the same functionality as GetPropertyNames but | * This function has the same functionality as GetPropertyNames but | |||
* the returned array doesn't contain the names of properties from | * the returned array doesn't contain the names of properties from | |||
skipping to change at line 2983 | skipping to change at line 3013 | |||
private: | private: | |||
static void CheckCast(v8::Value* obj); | static void CheckCast(v8::Value* obj); | |||
}; | }; | |||
/** | /** | |||
* A JavaScript value that wraps a C++ void*. This type of value is mainly used | * A JavaScript value that wraps a C++ void*. This type of value is mainly used | |||
* to associate C++ data structures with JavaScript objects. | * to associate C++ data structures with JavaScript objects. | |||
*/ | */ | |||
class V8_EXPORT External : public Value { | class V8_EXPORT External : public Value { | |||
public: | public: | |||
static Local<External> New(Isolate* isolate, void* value); | ||||
// Deprecated, do not use. | ||||
static Local<External> New(void* value); | static Local<External> New(void* value); | |||
V8_INLINE static External* Cast(Value* obj); | V8_INLINE static External* Cast(Value* obj); | |||
void* Value() const; | void* Value() const; | |||
private: | private: | |||
static void CheckCast(v8::Value* obj); | static void CheckCast(v8::Value* obj); | |||
}; | }; | |||
// --- Templates --- | // --- Templates --- | |||
/** | /** | |||
skipping to change at line 5676 | skipping to change at line 5708 | |||
if (V8_LIKELY(I::IsValidSmi(i))) { | if (V8_LIKELY(I::IsValidSmi(i))) { | |||
*value_ = I::IntToSmi(i); | *value_ = I::IntToSmi(i); | |||
return; | return; | |||
} | } | |||
Set(Integer::New(i, GetIsolate())); | Set(Integer::New(i, GetIsolate())); | |||
} | } | |||
template<typename T> | template<typename T> | |||
void ReturnValue<T>::Set(uint32_t i) { | void ReturnValue<T>::Set(uint32_t i) { | |||
TYPE_CHECK(T, Integer); | TYPE_CHECK(T, Integer); | |||
typedef internal::Internals I; | ||||
// Can't simply use INT32_MAX here for whatever reason. | // Can't simply use INT32_MAX here for whatever reason. | |||
bool fits_into_int32_t = (i & (1U << 31)) == 0; | bool fits_into_int32_t = (i & (1U << 31)) == 0; | |||
if (V8_LIKELY(fits_into_int32_t)) { | if (V8_LIKELY(fits_into_int32_t)) { | |||
Set(static_cast<int32_t>(i)); | Set(static_cast<int32_t>(i)); | |||
return; | return; | |||
} | } | |||
Set(Integer::NewFromUnsigned(i, GetIsolate())); | Set(Integer::NewFromUnsigned(i, GetIsolate())); | |||
} | } | |||
template<typename T> | template<typename T> | |||
End of changes. 7 change blocks. | ||||
7 lines changed or deleted | 40 lines changed or added | |||
v8config.h | v8config.h | |||
---|---|---|---|---|
skipping to change at line 184 | skipping to change at line 184 | |||
// | // | |||
// Compiler-specific feature detection | // Compiler-specific feature detection | |||
// | // | |||
// V8_HAS___ALIGNOF - __alignof(type) operator supporte d | // V8_HAS___ALIGNOF - __alignof(type) operator supporte d | |||
// V8_HAS___ALIGNOF__ - __alignof__(type) operator suppor ted | // V8_HAS___ALIGNOF__ - __alignof__(type) operator suppor ted | |||
// V8_HAS_ATTRIBUTE_ALIGNED - __attribute__((aligned(n))) suppo rted | // V8_HAS_ATTRIBUTE_ALIGNED - __attribute__((aligned(n))) suppo rted | |||
// V8_HAS_ATTRIBUTE_ALWAYS_INLINE - __attribute__((always_inline)) | // V8_HAS_ATTRIBUTE_ALWAYS_INLINE - __attribute__((always_inline)) | |||
// supported | // supported | |||
// V8_HAS_ATTRIBUTE_DEPRECATED - __attribute__((deprecated)) suppo rted | // V8_HAS_ATTRIBUTE_DEPRECATED - __attribute__((deprecated)) suppo rted | |||
// V8_HAS_ATTRIBUTE_NOINLINE - __attribute__((noinline)) support ed | // V8_HAS_ATTRIBUTE_NOINLINE - __attribute__((noinline)) support ed | |||
// V8_HAS_ATTRIBUTE_UNUSED - __attribute__((unused)) supported | ||||
// V8_HAS_ATTRIBUTE_VISIBILITY - __attribute__((visibility)) suppo rted | // V8_HAS_ATTRIBUTE_VISIBILITY - __attribute__((visibility)) suppo rted | |||
// V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT - __attribute__((warn_unused_result )) | // V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT - __attribute__((warn_unused_result )) | |||
// supported | // supported | |||
// V8_HAS_BUILTIN_EXPECT - __builtin_expect() supported | // V8_HAS_BUILTIN_EXPECT - __builtin_expect() supported | |||
// V8_HAS_DECLSPEC_ALIGN - __declspec(align(n)) supported | // V8_HAS_DECLSPEC_ALIGN - __declspec(align(n)) supported | |||
// V8_HAS_DECLSPEC_DEPRECATED - __declspec(deprecated) supported | // V8_HAS_DECLSPEC_DEPRECATED - __declspec(deprecated) supported | |||
// V8_HAS_DECLSPEC_NOINLINE - __declspec(noinline) supported | // V8_HAS_DECLSPEC_NOINLINE - __declspec(noinline) supported | |||
// V8_HAS___FINAL - __final supported in non-C++11 mo de | // V8_HAS___FINAL - __final supported in non-C++11 mo de | |||
// V8_HAS___FORCEINLINE - __forceinline supported | // V8_HAS___FORCEINLINE - __forceinline supported | |||
// V8_HAS_SEALED - MSVC style sealed marker supporte d | // V8_HAS_SEALED - MSVC style sealed marker supporte d | |||
skipping to change at line 213 | skipping to change at line 214 | |||
# define V8_CC_CLANG 1 | # define V8_CC_CLANG 1 | |||
// Clang defines __alignof__ as alias for __alignof | // Clang defines __alignof__ as alias for __alignof | |||
# define V8_HAS___ALIGNOF 1 | # define V8_HAS___ALIGNOF 1 | |||
# define V8_HAS___ALIGNOF__ V8_HAS___ALIGNOF | # define V8_HAS___ALIGNOF__ V8_HAS___ALIGNOF | |||
# define V8_HAS_ATTRIBUTE_ALIGNED (__has_attribute(aligned)) | # define V8_HAS_ATTRIBUTE_ALIGNED (__has_attribute(aligned)) | |||
# define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline)) | # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline)) | |||
# define V8_HAS_ATTRIBUTE_DEPRECATED (__has_attribute(deprecated)) | # define V8_HAS_ATTRIBUTE_DEPRECATED (__has_attribute(deprecated)) | |||
# define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline)) | # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline)) | |||
# define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused)) | ||||
# define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility)) | # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility)) | |||
# define V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT \ | # define V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT \ | |||
(__has_attribute(warn_unused_result)) | (__has_attribute(warn_unused_result)) | |||
# define V8_HAS_BUILTIN_EXPECT (__has_builtin(__builtin_expect)) | # define V8_HAS_BUILTIN_EXPECT (__has_builtin(__builtin_expect)) | |||
# define V8_HAS_CXX11_ALIGNAS (__has_feature(cxx_alignas)) | # define V8_HAS_CXX11_ALIGNAS (__has_feature(cxx_alignas)) | |||
# define V8_HAS_CXX11_STATIC_ASSERT (__has_feature(cxx_static_assert)) | # define V8_HAS_CXX11_STATIC_ASSERT (__has_feature(cxx_static_assert)) | |||
# define V8_HAS_CXX11_DELETE (__has_feature(cxx_deleted_functions)) | # define V8_HAS_CXX11_DELETE (__has_feature(cxx_deleted_functions)) | |||
# define V8_HAS_CXX11_FINAL (__has_feature(cxx_override_control)) | # define V8_HAS_CXX11_FINAL (__has_feature(cxx_override_control)) | |||
skipping to change at line 244 | skipping to change at line 246 | |||
# define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0)) | # define V8_HAS___ALIGNOF__ (V8_GNUC_PREREQ(4, 3, 0)) | |||
# define V8_HAS_ATTRIBUTE_ALIGNED (V8_GNUC_PREREQ(2, 95, 0)) | # define V8_HAS_ATTRIBUTE_ALIGNED (V8_GNUC_PREREQ(2, 95, 0)) | |||
// always_inline is available in gcc 4.0 but not very reliable until 4.4. | // always_inline is available in gcc 4.0 but not very reliable until 4.4. | |||
// Works around "sorry, unimplemented: inlining failed" build errors with | // Works around "sorry, unimplemented: inlining failed" build errors with | |||
// older compilers. | // older compilers. | |||
# define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (V8_GNUC_PREREQ(4, 4, 0)) | # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (V8_GNUC_PREREQ(4, 4, 0)) | |||
# define V8_HAS_ATTRIBUTE_DEPRECATED (V8_GNUC_PREREQ(3, 4, 0)) | # define V8_HAS_ATTRIBUTE_DEPRECATED (V8_GNUC_PREREQ(3, 4, 0)) | |||
# define V8_HAS_ATTRIBUTE_DEPRECATED_MESSAGE (V8_GNUC_PREREQ(4, 5, 0)) | # define V8_HAS_ATTRIBUTE_DEPRECATED_MESSAGE (V8_GNUC_PREREQ(4, 5, 0)) | |||
# define V8_HAS_ATTRIBUTE_NOINLINE (V8_GNUC_PREREQ(3, 4, 0)) | # define V8_HAS_ATTRIBUTE_NOINLINE (V8_GNUC_PREREQ(3, 4, 0)) | |||
# define V8_HAS_ATTRIBUTE_UNUSED (V8_GNUC_PREREQ(2, 95, 0)) | ||||
# define V8_HAS_ATTRIBUTE_VISIBILITY (V8_GNUC_PREREQ(4, 3, 0)) | # define V8_HAS_ATTRIBUTE_VISIBILITY (V8_GNUC_PREREQ(4, 3, 0)) | |||
# define V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT \ | # define V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT \ | |||
(!V8_CC_INTEL && V8_GNUC_PREREQ(4, 1, 0)) | (!V8_CC_INTEL && V8_GNUC_PREREQ(4, 1, 0)) | |||
# define V8_HAS_BUILTIN_EXPECT (V8_GNUC_PREREQ(2, 96, 0)) | # define V8_HAS_BUILTIN_EXPECT (V8_GNUC_PREREQ(2, 96, 0)) | |||
// g++ requires -std=c++0x or -std=gnu++0x to support C++11 functionality | // g++ requires -std=c++0x or -std=gnu++0x to support C++11 functionality | |||
// without warnings (functionality used by the macros below). These modes | // without warnings (functionality used by the macros below). These modes | |||
// are detectable by checking whether __GXX_EXPERIMENTAL_CXX0X__ is defined or, | // are detectable by checking whether __GXX_EXPERIMENTAL_CXX0X__ is defined or, | |||
// more standardly, by checking whether __cplusplus has a C++11 or greater | // more standardly, by checking whether __cplusplus has a C++11 or greater | |||
skipping to change at line 327 | skipping to change at line 330 | |||
declarator __attribute__((deprecated(message))) | declarator __attribute__((deprecated(message))) | |||
#elif defined(V8_DEPRECATION_WARNINGS) && V8_HAS_ATTRIBUTE_DEPRECATED | #elif defined(V8_DEPRECATION_WARNINGS) && V8_HAS_ATTRIBUTE_DEPRECATED | |||
# define V8_DEPRECATED(message, declarator) \ | # define V8_DEPRECATED(message, declarator) \ | |||
declarator __attribute__((deprecated)) | declarator __attribute__((deprecated)) | |||
#elif defined(V8_DEPRECATION_WARNINGS) && V8_HAS_DECLSPEC_DEPRECATED | #elif defined(V8_DEPRECATION_WARNINGS) && V8_HAS_DECLSPEC_DEPRECATED | |||
# define V8_DEPRECATED(message, declarator) __declspec(deprecated) declarat or | # define V8_DEPRECATED(message, declarator) __declspec(deprecated) declarat or | |||
#else | #else | |||
# define V8_DEPRECATED(message, declarator) declarator | # define V8_DEPRECATED(message, declarator) declarator | |||
#endif | #endif | |||
// A macro to mark variables or types as unused, avoiding compiler warnings | ||||
. | ||||
#if V8_HAS_ATTRIBUTE_UNUSED | ||||
# define V8_UNUSED __attribute__((unused)) | ||||
#else | ||||
# define V8_UNUSED | ||||
#endif | ||||
// Annotate a function indicating the caller must examine the return value. | // Annotate a function indicating the caller must examine the return value. | |||
// Use like: | // Use like: | |||
// int foo() V8_WARN_UNUSED_RESULT; | // int foo() V8_WARN_UNUSED_RESULT; | |||
#if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT | #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT | |||
# define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) | # define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) | |||
#else | #else | |||
# define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */ | # define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */ | |||
#endif | #endif | |||
// A macro to provide the compiler with branch prediction information. | // A macro to provide the compiler with branch prediction information. | |||
End of changes. 4 change blocks. | ||||
0 lines changed or deleted | 11 lines changed or added | |||