v8-profiler.h   v8-profiler.h 
skipping to change at line 60 skipping to change at line 60
/** Returns resource name for script from where the function originates. */ /** Returns resource name for script from where the function originates. */
Handle<String> GetScriptResourceName() const; Handle<String> GetScriptResourceName() const;
/** /**
* Returns the number, 1-based, of the line where the function originates . * Returns the number, 1-based, of the line where the function originates .
* kNoLineNumberInfo if no line number information is available. * kNoLineNumberInfo if no line number information is available.
*/ */
int GetLineNumber() const; int GetLineNumber() const;
/**
* Returns total (self + children) execution time of the function,
* in milliseconds, estimated by samples count.
*/
V8_DEPRECATED(double GetTotalTime() const);
/**
* Returns self execution time of the function, in milliseconds,
* estimated by samples count.
*/
V8_DEPRECATED(double GetSelfTime() const);
/** Returns the count of samples where function exists. */
V8_DEPRECATED(double GetTotalSamplesCount() const);
/** DEPRECATED. Please use GetHitCount instead. /** DEPRECATED. Please use GetHitCount instead.
* Returns the count of samples where function was currently executing. * Returns the count of samples where function was currently executing.
*/ */
V8_DEPRECATED(double GetSelfSamplesCount() const); V8_DEPRECATED(double GetSelfSamplesCount() const);
/** /**
* Returns the count of samples where the function was currently executi ng. * Returns the count of samples where the function was currently executi ng.
*/ */
unsigned GetHitCount() const; unsigned GetHitCount() const;
 End of changes. 1 change blocks. 
15 lines changed or deleted 0 lines changed or added


 v8.h   v8.h 
skipping to change at line 86 skipping to change at line 86
# define V8_EXPORT # define V8_EXPORT
#endif #endif
#endif // V8_OS_WIN #endif // V8_OS_WIN
/** /**
* The v8 JavaScript engine. * The v8 JavaScript engine.
*/ */
namespace v8 { namespace v8 {
class AccessorInfo;
class AccessorSignature; class AccessorSignature;
class Array; class Array;
class Boolean; class Boolean;
class BooleanObject; class BooleanObject;
class Context; class Context;
class CpuProfiler; class CpuProfiler;
class Data; class Data;
class Date; class Date;
class DeclaredAccessorDescriptor; class DeclaredAccessorDescriptor;
class External; class External;
skipping to change at line 128 skipping to change at line 127
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 Persistent; template <class T> class Persistent;
class FunctionTemplate; class FunctionTemplate;
class ObjectTemplate; class ObjectTemplate;
class Data; class Data;
class AccessorInfo;
template<typename T> class PropertyCallbackInfo; template<typename T> class PropertyCallbackInfo;
class StackTrace; class StackTrace;
class StackFrame; class StackFrame;
class Isolate; class Isolate;
class DeclaredAccessorDescriptor; class DeclaredAccessorDescriptor;
class ObjectOperationDescriptor; class ObjectOperationDescriptor;
class RawOperationDescriptor; class RawOperationDescriptor;
class CallHandlerHelper; class CallHandlerHelper;
namespace internal { namespace internal {
skipping to change at line 350 skipping to change at line 348
/** /**
* Creates a new handle for the specified value. * Creates a new handle for the specified value.
*/ */
V8_INLINE(explicit Handle(T* val)) : val_(val) {} V8_INLINE(explicit Handle(T* val)) : val_(val) {}
#endif #endif
private: private:
friend class Utils; friend class Utils;
template<class F> friend class Persistent; template<class F> friend class Persistent;
template<class F> friend class Local; template<class F> friend class Local;
friend class Arguments;
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 class AccessorInfo;
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;
#ifndef V8_USE_UNSAFE_HANDLES #ifndef V8_USE_UNSAFE_HANDLES
V8_INLINE(static Handle<T> New(Isolate* isolate, T* that)); V8_INLINE(static Handle<T> New(Isolate* isolate, T* that));
#endif #endif
skipping to change at line 436 skipping to change at line 432
private: private:
#endif #endif
template <class S> V8_INLINE(Local(S* that) : Handle<T>(that)) { } template <class S> V8_INLINE(Local(S* that) : Handle<T>(that)) { }
#endif #endif
private: private:
friend class Utils; friend class Utils;
template<class F> friend class Eternal; template<class F> friend class Eternal;
template<class F> friend class Persistent; template<class F> friend class Persistent;
template<class F> friend class Handle; template<class F> friend class Handle;
friend class Arguments;
template<class F> friend class FunctionCallbackInfo; template<class F> friend class FunctionCallbackInfo;
template<class F> friend class PropertyCallbackInfo; template<class F> friend class PropertyCallbackInfo;
friend class String; friend class String;
friend class Object; friend class Object;
friend class AccessorInfo;
friend class Context; friend class Context;
template<class F> friend class internal::CustomArguments; template<class F> friend class internal::CustomArguments;
friend class HandleScope; friend class HandleScope;
V8_INLINE(static Local<T> New(Isolate* isolate, T* that)); V8_INLINE(static Local<T> New(Isolate* isolate, T* that));
}; };
// Eternal handles are set-once handles that live for the life of the isola te. // Eternal handles are set-once handles that live for the life of the isola te.
template <class T> class Eternal { template <class T> class Eternal {
public: public:
skipping to change at line 2008 skipping to change at line 2002
kExternalFloatArray, kExternalFloatArray,
kExternalDoubleArray, kExternalDoubleArray,
kExternalPixelArray kExternalPixelArray
}; };
/** /**
* Accessor[Getter|Setter] are used as callback functions when * Accessor[Getter|Setter] are used as callback functions when
* setting|getting a particular property. See Object and ObjectTemplate's * setting|getting a particular property. See Object and ObjectTemplate's
* method SetAccessor. * method SetAccessor.
*/ */
typedef Handle<Value> (*AccessorGetter)(Local<String> property,
const AccessorInfo& info);
typedef void (*AccessorGetterCallback)( typedef void (*AccessorGetterCallback)(
Local<String> property, Local<String> property,
const PropertyCallbackInfo<Value>& info); const PropertyCallbackInfo<Value>& info);
typedef void (*AccessorSetter)(Local<String> property,
Local<Value> value,
const AccessorInfo& info);
typedef void (*AccessorSetterCallback)( typedef void (*AccessorSetterCallback)(
Local<String> property, Local<String> property,
Local<Value> value, Local<Value> value,
const PropertyCallbackInfo<void>& info); const PropertyCallbackInfo<void>& info);
/** /**
* Access control specifications. * Access control specifications.
* *
* Some accessors should be accessible across contexts. These * Some accessors should be accessible across contexts. These
* accessors have an explicit access control parameter which specifies * accessors have an explicit access control parameter which specifies
skipping to change at line 2088 skipping to change at line 2077
bool Delete(Handle<Value> key); bool Delete(Handle<Value> key);
// Delete a property on this object bypassing interceptors and // Delete a property on this object bypassing interceptors and
// ignoring dont-delete attributes. // ignoring dont-delete attributes.
bool ForceDelete(Handle<Value> key); bool ForceDelete(Handle<Value> key);
bool Has(uint32_t index); bool Has(uint32_t index);
bool Delete(uint32_t index); bool Delete(uint32_t index);
V8_DEPRECATED(bool SetAccessor(Handle<String> name,
AccessorGetter getter,
AccessorSetter setter = 0,
Handle<Value> data = Handle<Value>(),
AccessControl settings = DEFAULT,
PropertyAttribute attribute = None));
bool SetAccessor(Handle<String> name, bool SetAccessor(Handle<String> name,
AccessorGetterCallback getter, AccessorGetterCallback getter,
AccessorSetterCallback setter = 0, AccessorSetterCallback setter = 0,
Handle<Value> data = Handle<Value>(), Handle<Value> data = Handle<Value>(),
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 SetAccessor(Handle<String> name, bool SetAccessor(Handle<String> name,
Handle<DeclaredAccessorDescriptor> descriptor, Handle<DeclaredAccessorDescriptor> descriptor,
skipping to change at line 3015 skipping to change at line 2998
V8_INLINE(FunctionCallbackInfo(internal::Object** implicit_args, V8_INLINE(FunctionCallbackInfo(internal::Object** implicit_args,
internal::Object** values, internal::Object** values,
int length, int length,
bool is_construct_call)); bool is_construct_call));
internal::Object** implicit_args_; internal::Object** implicit_args_;
internal::Object** values_; internal::Object** values_;
int length_; int length_;
bool is_construct_call_; bool is_construct_call_;
}; };
class V8_EXPORT Arguments : public FunctionCallbackInfo<Value> {
private:
friend class internal::FunctionCallbackArguments;
V8_INLINE(Arguments(internal::Object** implicit_args,
internal::Object** values,
int length,
bool is_construct_call));
};
/** /**
* The information passed to a property callback about the context * The information passed to a property callback about the context
* of the property access. * of the property access.
*/ */
template<typename T> template<typename T>
class PropertyCallbackInfo { class PropertyCallbackInfo {
public: public:
V8_INLINE(Isolate* GetIsolate() const); V8_INLINE(Isolate* GetIsolate() const);
V8_INLINE(Local<Value> Data() const); V8_INLINE(Local<Value> Data() const);
V8_INLINE(Local<Object> This() const); V8_INLINE(Local<Object> This() const);
skipping to change at line 3055 skipping to change at line 3029
static const int kDataIndex = -2; static const int kDataIndex = -2;
static const int kReturnValueIndex = -3; static const int kReturnValueIndex = -3;
static const int kReturnValueDefaultValueIndex = -4; static const int kReturnValueDefaultValueIndex = -4;
static const int kIsolateIndex = -5; static const int kIsolateIndex = -5;
V8_INLINE(PropertyCallbackInfo(internal::Object** args)) V8_INLINE(PropertyCallbackInfo(internal::Object** args))
: args_(args) { } : args_(args) { }
internal::Object** args_; internal::Object** args_;
}; };
class V8_EXPORT AccessorInfo : public PropertyCallbackInfo<Value> {
private:
friend class internal::PropertyCallbackArguments;
V8_INLINE(AccessorInfo(internal::Object** args))
: PropertyCallbackInfo<Value>(args) { }
};
typedef Handle<Value> (*InvocationCallback)(const Arguments& args);
typedef void (*FunctionCallback)(const FunctionCallbackInfo<Value>& info); typedef void (*FunctionCallback)(const FunctionCallbackInfo<Value>& info);
/** /**
* NamedProperty[Getter|Setter] are used as interceptors on object. * NamedProperty[Getter|Setter] are used as interceptors on object.
* See ObjectTemplate::SetNamedPropertyHandler. * See ObjectTemplate::SetNamedPropertyHandler.
*/ */
typedef Handle<Value> (*NamedPropertyGetter)(Local<String> property,
const AccessorInfo& info);
typedef void (*NamedPropertyGetterCallback)( typedef void (*NamedPropertyGetterCallback)(
Local<String> property, Local<String> property,
const PropertyCallbackInfo<Value>& info); const PropertyCallbackInfo<Value>& info);
/** /**
* Returns the value if the setter intercepts the request. * Returns the value if the setter intercepts the request.
* Otherwise, returns an empty handle. * Otherwise, returns an empty handle.
*/ */
typedef Handle<Value> (*NamedPropertySetter)(Local<String> property,
Local<Value> value,
const AccessorInfo& info);
typedef void (*NamedPropertySetterCallback)( typedef void (*NamedPropertySetterCallback)(
Local<String> property, Local<String> property,
Local<Value> value, Local<Value> value,
const PropertyCallbackInfo<Value>& info); const PropertyCallbackInfo<Value>& info);
/** /**
* Returns a non-empty handle if the interceptor intercepts the request. * Returns a non-empty handle if the interceptor intercepts the request.
* The result is an integer encoding property attributes (like v8::None, * The result is an integer encoding property attributes (like v8::None,
* v8::DontEnum, etc.) * v8::DontEnum, etc.)
*/ */
typedef Handle<Integer> (*NamedPropertyQuery)(Local<String> property,
const AccessorInfo& info);
typedef void (*NamedPropertyQueryCallback)( typedef void (*NamedPropertyQueryCallback)(
Local<String> property, Local<String> property,
const PropertyCallbackInfo<Integer>& info); const PropertyCallbackInfo<Integer>& info);
/** /**
* Returns a non-empty handle if the deleter intercepts the request. * Returns a non-empty handle if the deleter intercepts the request.
* The return value is true if the property could be deleted and false * The return value is true if the property could be deleted and false
* otherwise. * otherwise.
*/ */
typedef Handle<Boolean> (*NamedPropertyDeleter)(Local<String> property,
const AccessorInfo& info);
typedef void (*NamedPropertyDeleterCallback)( typedef void (*NamedPropertyDeleterCallback)(
Local<String> property, Local<String> property,
const PropertyCallbackInfo<Boolean>& info); const PropertyCallbackInfo<Boolean>& info);
/** /**
* Returns an array containing the names of the properties the named * Returns an array containing the names of the properties the named
* property getter intercepts. * property getter intercepts.
*/ */
typedef Handle<Array> (*NamedPropertyEnumerator)(const AccessorInfo& info);
typedef void (*NamedPropertyEnumeratorCallback)( typedef void (*NamedPropertyEnumeratorCallback)(
const PropertyCallbackInfo<Array>& info); const PropertyCallbackInfo<Array>& info);
/** /**
* Returns the value of the property if the getter intercepts the * Returns the value of the property if the getter intercepts the
* request. Otherwise, returns an empty handle. * request. Otherwise, returns an empty handle.
*/ */
typedef Handle<Value> (*IndexedPropertyGetter)(uint32_t index,
const AccessorInfo& info);
typedef void (*IndexedPropertyGetterCallback)( typedef void (*IndexedPropertyGetterCallback)(
uint32_t index, uint32_t index,
const PropertyCallbackInfo<Value>& info); const PropertyCallbackInfo<Value>& info);
/** /**
* Returns the value if the setter intercepts the request. * Returns the value if the setter intercepts the request.
* Otherwise, returns an empty handle. * Otherwise, returns an empty handle.
*/ */
typedef Handle<Value> (*IndexedPropertySetter)(uint32_t index,
Local<Value> value,
const AccessorInfo& info);
typedef void (*IndexedPropertySetterCallback)( typedef void (*IndexedPropertySetterCallback)(
uint32_t index, uint32_t index,
Local<Value> value, Local<Value> value,
const PropertyCallbackInfo<Value>& info); const PropertyCallbackInfo<Value>& info);
/** /**
* Returns a non-empty handle if the interceptor intercepts the request. * Returns a non-empty handle if the interceptor intercepts the request.
* The result is an integer encoding property attributes. * The result is an integer encoding property attributes.
*/ */
typedef Handle<Integer> (*IndexedPropertyQuery)(uint32_t index,
const AccessorInfo& info);
typedef void (*IndexedPropertyQueryCallback)( typedef void (*IndexedPropertyQueryCallback)(
uint32_t index, uint32_t index,
const PropertyCallbackInfo<Integer>& info); const PropertyCallbackInfo<Integer>& info);
/** /**
* Returns a non-empty handle if the deleter intercepts the request. * Returns a non-empty handle if the deleter intercepts the request.
* The return value is true if the property could be deleted and false * The return value is true if the property could be deleted and false
* otherwise. * otherwise.
*/ */
typedef Handle<Boolean> (*IndexedPropertyDeleter)(uint32_t index,
const AccessorInfo& info)
;
typedef void (*IndexedPropertyDeleterCallback)( typedef void (*IndexedPropertyDeleterCallback)(
uint32_t index, uint32_t index,
const PropertyCallbackInfo<Boolean>& info); const PropertyCallbackInfo<Boolean>& info);
/** /**
* Returns an array containing the indices of the properties the * Returns an array containing the indices of the properties the
* indexed property getter intercepts. * indexed property getter intercepts.
*/ */
typedef Handle<Array> (*IndexedPropertyEnumerator)(const AccessorInfo& info );
typedef void (*IndexedPropertyEnumeratorCallback)( typedef void (*IndexedPropertyEnumeratorCallback)(
const PropertyCallbackInfo<Array>& info); const PropertyCallbackInfo<Array>& info);
/** /**
* Access type specification. * Access type specification.
*/ */
enum AccessType { enum AccessType {
ACCESS_GET, ACCESS_GET,
ACCESS_SET, ACCESS_SET,
ACCESS_HAS, ACCESS_HAS,
skipping to change at line 3292 skipping to change at line 3238
* *
* \code * \code
* child_func.prototype.__proto__ == function.prototype; * child_func.prototype.__proto__ == function.prototype;
* child_instance.instance_accessor calls 'InstanceAccessorCallback' * child_instance.instance_accessor calls 'InstanceAccessorCallback'
* child_instance.instance_property == 3; * child_instance.instance_property == 3;
* \endcode * \endcode
*/ */
class V8_EXPORT FunctionTemplate : public Template { class V8_EXPORT FunctionTemplate : public Template {
public: public:
/** Creates a function template.*/ /** Creates a function template.*/
V8_DEPRECATED(static Local<FunctionTemplate> New(
InvocationCallback callback,
Handle<Value> data = Handle<Value>(),
Handle<Signature> signature = Handle<Signature>(),
int length = 0));
static Local<FunctionTemplate> New( static Local<FunctionTemplate> New(
FunctionCallback callback = 0, FunctionCallback callback = 0,
Handle<Value> data = Handle<Value>(), Handle<Value> data = Handle<Value>(),
Handle<Signature> signature = Handle<Signature>(), Handle<Signature> signature = Handle<Signature>(),
int length = 0); int length = 0);
/** Returns the unique function instance in the current execution context .*/ /** Returns the unique function instance in the current execution context .*/
Local<Function> GetFunction(); Local<Function> GetFunction();
/** /**
* Set the call-handler callback for a FunctionTemplate. This * Set the call-handler callback for a FunctionTemplate. This
* callback is called whenever the function created from this * callback is called whenever the function created from this
* FunctionTemplate is called. * FunctionTemplate is called.
*/ */
V8_DEPRECATED(void SetCallHandler(InvocationCallback callback,
Handle<Value> data = Handle<Value>()));
void SetCallHandler(FunctionCallback callback, void SetCallHandler(FunctionCallback callback,
Handle<Value> data = Handle<Value>()); Handle<Value> data = Handle<Value>());
/** Set the predefined length property for the FunctionTemplate. */ /** Set the predefined length property for the FunctionTemplate. */
void SetLength(int length); void SetLength(int length);
/** Get the InstanceTemplate. */ /** Get the InstanceTemplate. */
Local<ObjectTemplate> InstanceTemplate(); Local<ObjectTemplate> InstanceTemplate();
/** Causes the function template to inherit from a parent function templa te.*/ /** Causes the function template to inherit from a parent function templa te.*/
skipping to change at line 3359 skipping to change at line 3298
*/ */
void SetHiddenPrototype(bool value); void SetHiddenPrototype(bool value);
/** /**
* Sets the ReadOnly flag in the attributes of the 'prototype' property * Sets the ReadOnly flag in the attributes of the 'prototype' property
* of functions created from this FunctionTemplate to true. * of functions created from this FunctionTemplate to true.
*/ */
void ReadOnlyPrototype(); void ReadOnlyPrototype();
/** /**
* Removes the prototype property from functions created from this
* FunctionTemplate.
*/
void RemovePrototype();
/**
* Returns true if the given object is an instance of this function * Returns true if the given object is an instance of this function
* template. * template.
*/ */
bool HasInstance(Handle<Value> object); bool HasInstance(Handle<Value> object);
private: private:
FunctionTemplate(); FunctionTemplate();
// TODO(dcarney): Remove with SetCallHandler.
friend class v8::CallHandlerHelper;
void SetCallHandlerInternal(InvocationCallback callback, Handle<Value> da
ta);
friend class Context; friend class Context;
friend class ObjectTemplate; friend class ObjectTemplate;
}; };
/** /**
* An ObjectTemplate is used to create objects at runtime. * An ObjectTemplate is used to create objects at runtime.
* *
* Properties added to an ObjectTemplate are added to each object * Properties added to an ObjectTemplate are added to each object
* created from the ObjectTemplate. * created from the ObjectTemplate.
*/ */
skipping to change at line 3416 skipping to change at line 3358
* The combination ALL_CAN_READ | ALL_CAN_WRITE can be used to allow al l * The combination ALL_CAN_READ | ALL_CAN_WRITE can be used to allow al l
* cross-context access. * cross-context access.
* \param attribute The attributes of the property for which an accessor * \param attribute The attributes of the property for which an accessor
* is added. * is added.
* \param signature The signature describes valid receivers for the acces sor * \param signature The signature describes valid receivers for the acces sor
* and is used to perform implicit instance checks against them. If the * and is used to perform implicit instance checks against them. If the
* receiver is incompatible (i.e. is not an instance of the constructor as * receiver is incompatible (i.e. is not an instance of the constructor as
* defined by FunctionTemplate::HasInstance()), an implicit TypeError i s * defined by FunctionTemplate::HasInstance()), an implicit TypeError i s
* thrown and no callback is invoked. * thrown and no callback is invoked.
*/ */
V8_DEPRECATED(void SetAccessor(Handle<String> name,
AccessorGetter getter,
AccessorSetter setter = 0,
Handle<Value> data = Handle<Value>(),
AccessControl settings = DEFAULT,
PropertyAttribute attribute = None,
Handle<AccessorSignature> signature =
Handle<AccessorSignature>()));
void SetAccessor(Handle<String> name, void SetAccessor(Handle<String> name,
AccessorGetterCallback getter, AccessorGetterCallback getter,
AccessorSetterCallback setter = 0, AccessorSetterCallback setter = 0,
Handle<Value> data = Handle<Value>(), Handle<Value> data = Handle<Value>(),
AccessControl settings = DEFAULT, AccessControl settings = DEFAULT,
PropertyAttribute attribute = None, PropertyAttribute attribute = None,
Handle<AccessorSignature> signature = Handle<AccessorSignature> signature =
Handle<AccessorSignature>()); Handle<AccessorSignature>());
// 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.
skipping to change at line 3458 skipping to change at line 3392
* \param getter The callback to invoke when getting a property. * \param getter The callback to invoke when getting a property.
* \param setter The callback to invoke when setting a property. * \param setter The callback to invoke when setting a property.
* \param query The callback to invoke to check if a property is present, * \param query The callback to invoke to check if a property is present,
* and if present, get its attributes. * and if present, get its attributes.
* \param deleter The callback to invoke when deleting a property. * \param deleter The callback to invoke when deleting a property.
* \param enumerator The callback to invoke to enumerate all the named * \param enumerator The callback to invoke to enumerate all the named
* properties of an object. * properties of an object.
* \param data A piece of data that will be passed to the callbacks * \param data A piece of data that will be passed to the callbacks
* whenever they are invoked. * whenever they are invoked.
*/ */
V8_DEPRECATED(void SetNamedPropertyHandler(
NamedPropertyGetter getter,
NamedPropertySetter setter = 0,
NamedPropertyQuery query = 0,
NamedPropertyDeleter deleter = 0,
NamedPropertyEnumerator enumerator = 0,
Handle<Value> data = Handle<Value>()));
void SetNamedPropertyHandler( void SetNamedPropertyHandler(
NamedPropertyGetterCallback getter, NamedPropertyGetterCallback getter,
NamedPropertySetterCallback setter = 0, NamedPropertySetterCallback setter = 0,
NamedPropertyQueryCallback query = 0, NamedPropertyQueryCallback query = 0,
NamedPropertyDeleterCallback deleter = 0, NamedPropertyDeleterCallback deleter = 0,
NamedPropertyEnumeratorCallback enumerator = 0, NamedPropertyEnumeratorCallback enumerator = 0,
Handle<Value> data = Handle<Value>()); Handle<Value> data = Handle<Value>());
/** /**
* Sets an indexed property handler on the object template. * Sets an indexed property handler on the object template.
skipping to change at line 3489 skipping to change at line 3416
* *
* \param getter The callback to invoke when getting a property. * \param getter The callback to invoke when getting a property.
* \param setter The callback to invoke when setting a property. * \param setter The callback to invoke when setting a property.
* \param query The callback to invoke to check if an object has a proper ty. * \param query The callback to invoke to check if an object has a proper ty.
* \param deleter The callback to invoke when deleting a property. * \param deleter The callback to invoke when deleting a property.
* \param enumerator The callback to invoke to enumerate all the indexed * \param enumerator The callback to invoke to enumerate all the indexed
* properties of an object. * properties of an object.
* \param data A piece of data that will be passed to the callbacks * \param data A piece of data that will be passed to the callbacks
* whenever they are invoked. * whenever they are invoked.
*/ */
V8_DEPRECATED(void SetIndexedPropertyHandler(
IndexedPropertyGetter getter,
IndexedPropertySetter setter = 0,
IndexedPropertyQuery query = 0,
IndexedPropertyDeleter deleter = 0,
IndexedPropertyEnumerator enumerator = 0,
Handle<Value> data = Handle<Value>()));
void SetIndexedPropertyHandler( void SetIndexedPropertyHandler(
IndexedPropertyGetterCallback getter, IndexedPropertyGetterCallback getter,
IndexedPropertySetterCallback setter = 0, IndexedPropertySetterCallback setter = 0,
IndexedPropertyQueryCallback query = 0, IndexedPropertyQueryCallback query = 0,
IndexedPropertyDeleterCallback deleter = 0, IndexedPropertyDeleterCallback deleter = 0,
IndexedPropertyEnumeratorCallback enumerator = 0, IndexedPropertyEnumeratorCallback enumerator = 0,
Handle<Value> data = Handle<Value>()); Handle<Value> data = Handle<Value>());
/** /**
* Sets the callback to be used when calling instances created from * Sets the callback to be used when calling instances created from
* this template as a function. If no callback is set, instances * this template as a function. If no callback is set, instances
* behave like normal JavaScript objects that cannot be called as a * behave like normal JavaScript objects that cannot be called as a
* function. * function.
*/ */
V8_DEPRECATED(void SetCallAsFunctionHandler(
InvocationCallback callback,
Handle<Value> data = Handle<Value>()));
void SetCallAsFunctionHandler(FunctionCallback callback, void SetCallAsFunctionHandler(FunctionCallback callback,
Handle<Value> data = Handle<Value>()); Handle<Value> data = Handle<Value>());
/** /**
* Mark object instances of the template as undetectable. * Mark object instances of the template as undetectable.
* *
* In many ways, undetectable objects behave as though they are not * In many ways, undetectable objects behave as though they are not
* there. They behave like 'undefined' in conditionals and when * there. They behave like 'undefined' in conditionals and when
* printed. However, properties can be accessed and called as on * printed. However, properties can be accessed and called as on
* normal objects. * normal objects.
skipping to change at line 5351 skipping to change at line 5268
} }
V8_INLINE(static bool IsValidSmi(intptr_t value)) { V8_INLINE(static bool IsValidSmi(intptr_t value)) {
// To be representable as a long smi, the value must be a 32-bit intege r. // To be representable as a long smi, the value must be a 32-bit intege r.
return (value == static_cast<int32_t>(value)); return (value == static_cast<int32_t>(value));
} }
}; };
typedef SmiTagging<kApiPointerSize> PlatformSmiTagging; typedef SmiTagging<kApiPointerSize> PlatformSmiTagging;
const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize; const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize;
const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize; const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize;
V8_INLINE(static bool SmiValuesAre31Bits()) { return kSmiValueSize == 31; }
V8_INLINE(static bool SmiValuesAre32Bits()) { return kSmiValueSize == 32; }
/** /**
* This class exports constants and functionality from within v8 that * This class exports constants and functionality from within v8 that
* is necessary to implement inline functions in the v8 api. Don't * is necessary to implement inline functions in the v8 api. Don't
* depend on functions and constants defined here. * depend on functions and constants defined here.
*/ */
class Internals { class Internals {
public: public:
// These values match non-compiler-dependent values defined within // These values match non-compiler-dependent values defined within
// the implementation of v8. // the implementation of v8.
skipping to change at line 5863 skipping to change at line 5782
template<typename T> template<typename T>
FunctionCallbackInfo<T>::FunctionCallbackInfo(internal::Object** implicit_a rgs, FunctionCallbackInfo<T>::FunctionCallbackInfo(internal::Object** implicit_a rgs,
internal::Object** values, internal::Object** values,
int length, int length,
bool is_construct_call) bool is_construct_call)
: implicit_args_(implicit_args), : implicit_args_(implicit_args),
values_(values), values_(values),
length_(length), length_(length),
is_construct_call_(is_construct_call) { } is_construct_call_(is_construct_call) { }
Arguments::Arguments(internal::Object** args,
internal::Object** values,
int length,
bool is_construct_call)
: FunctionCallbackInfo<Value>(args, values, length, is_construct_call)
{ }
template<typename T> template<typename T>
Local<Value> FunctionCallbackInfo<T>::operator[](int i) const { Local<Value> FunctionCallbackInfo<T>::operator[](int i) const {
if (i < 0 || length_ <= i) return Local<Value>(*Undefined()); if (i < 0 || length_ <= i) return Local<Value>(*Undefined());
return Local<Value>(reinterpret_cast<Value*>(values_ - i)); return Local<Value>(reinterpret_cast<Value*>(values_ - i));
} }
template<typename T> template<typename T>
Local<Function> FunctionCallbackInfo<T>::Callee() const { Local<Function> FunctionCallbackInfo<T>::Callee() const {
return Local<Function>(reinterpret_cast<Function*>( return Local<Function>(reinterpret_cast<Function*>(
&implicit_args_[kCalleeIndex])); &implicit_args_[kCalleeIndex]));
 End of changes. 31 change blocks. 
98 lines changed or deleted 8 lines changed or added


 v8config.h   v8config.h 
skipping to change at line 93 skipping to change at line 93
# define V8_OS_POSIX 1 # define V8_OS_POSIX 1
#elif defined(_WIN32) #elif defined(_WIN32)
# define V8_OS_WIN 1 # define V8_OS_WIN 1
#endif #endif
// ------------------------------------------------------------------------ ----- // ------------------------------------------------------------------------ -----
// Compiler detection // Compiler detection
// //
// V8_CC_CLANG - Clang // V8_CC_CLANG - Clang
// V8_CC_GNU - GNU C++ // V8_CC_GNU - GNU C++
// V8_CC_INTEL - Intel C++
// V8_CC_MINGW - Minimalist GNU for Windows // V8_CC_MINGW - Minimalist GNU for Windows
// V8_CC_MINGW32 - Minimalist GNU for Windows (mingw32)
// V8_CC_MINGW64 - Minimalist GNU for Windows (mingw-w64)
// V8_CC_MSVC - Microsoft Visual C/C++ // V8_CC_MSVC - Microsoft Visual C/C++
// //
// C++11 feature detection // C++11 feature detection
// //
// V8_HAS_CXX11_ALIGNAS - alignas specifier supported // V8_HAS_CXX11_ALIGNAS - alignas specifier supported
// V8_HAS_CXX11_ALIGNOF - alignof(type) operator supported // V8_HAS_CXX11_ALIGNOF - alignof(type) operator supported
// V8_HAS_CXX11_STATIC_ASSERT - static_assert() supported // V8_HAS_CXX11_STATIC_ASSERT - static_assert() supported
// V8_HAS_CXX11_DELETE - deleted functions supported // V8_HAS_CXX11_DELETE - deleted functions supported
// V8_HAS_CXX11_FINAL - final marker supported // V8_HAS_CXX11_FINAL - final marker supported
// V8_HAS_CXX11_OVERRIDE - override marker supported // V8_HAS_CXX11_OVERRIDE - override marker supported
// //
// Compiler-specific feature detection // Compiler-specific feature detection
// //
// V8_HAS___ALIGNOF - __alignof(type) operator supported // V8_HAS___ALIGNOF - __alignof(type) operator supporte
// V8_HAS___ALIGNOF__ - __alignof__(type) operator supported d
// V8_HAS_ATTRIBUTE_ALIGNED - __attribute__((aligned(n))) supported // V8_HAS___ALIGNOF__ - __alignof__(type) operator suppor
// V8_HAS_ATTRIBUTE_ALWAYS_INLINE - __attribute__((always_inline)) suppor ted
ted // V8_HAS_ATTRIBUTE_ALIGNED - __attribute__((aligned(n))) suppo
// V8_HAS_ATTRIBUTE_DEPRECATED - __attribute__((deprecated)) supported rted
// V8_HAS_ATTRIBUTE_VISIBILITY - __attribute__((visibility)) supported // V8_HAS_ATTRIBUTE_ALWAYS_INLINE - __attribute__((always_inline))
// V8_HAS_BUILTIN_EXPECT - __builtin_expect() supported // supported
// V8_HAS_DECLSPEC_ALIGN - __declspec(align(n)) supported // V8_HAS_ATTRIBUTE_DEPRECATED - __attribute__((deprecated)) suppo
// V8_HAS_DECLSPEC_DEPRECATED - __declspec(deprecated) supported rted
// V8_HAS___FINAL - __final supported in non-C++11 mode // V8_HAS_ATTRIBUTE_NOINLINE - __attribute__((noinline)) support
// V8_HAS___FORCEINLINE - __forceinline supported ed
// V8_HAS_SEALED - MSVC style sealed marker supported // V8_HAS_ATTRIBUTE_VISIBILITY - __attribute__((visibility)) suppo
rted
// V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT - __attribute__((warn_unused_result
))
// supported
// V8_HAS_BUILTIN_EXPECT - __builtin_expect() supported
// V8_HAS_DECLSPEC_ALIGN - __declspec(align(n)) supported
// V8_HAS_DECLSPEC_DEPRECATED - __declspec(deprecated) supported
// V8_HAS_DECLSPEC_NOINLINE - __declspec(noinline) supported
// V8_HAS___FINAL - __final supported in non-C++11 mo
de
// V8_HAS___FORCEINLINE - __forceinline supported
// V8_HAS_SEALED - MSVC style sealed marker supporte
d
//
// Note that testing for compilers and/or features must be done using #if
// not #ifdef. For example, to test for Intel C++ Compiler, use:
// #if V8_CC_INTEL
// ...
// #endif
#if defined(__clang__) #if defined(__clang__)
// Don't treat clang as GCC. // Don't treat clang as GCC.
# define V8_GNUC_PREREQ(major, minor, patchlevel) 0 # define V8_GNUC_PREREQ(major, minor, patchlevel) 0
# 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_VISIBILITY (__has_attribute(visibility)) # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility))
# define V8_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))
# define V8_HAS_CXX11_OVERRIDE (__has_feature(cxx_override_control)) # define V8_HAS_CXX11_OVERRIDE (__has_feature(cxx_override_control))
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define V8_GNUC_PREREQ(major, minor, patchlevel) \ # define V8_GNUC_PREREQ(major, minor, patchlevel) \
((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \ ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \
((major) * 10000 + (minor) * 100 + (patchlevel))) ((major) * 10000 + (minor) * 100 + (patchlevel)))
# define V8_CC_GNU 1 # define V8_CC_GNU 1
# if defined(__MINGW32__) // Intel C++ also masquerades as GCC 3.2.0
# define V8_CC_MINGW 1 # define V8_CC_INTEL (defined(__INTEL_COMPILER))
# endif # define V8_CC_MINGW32 (defined(__MINGW32__))
# define V8_CC_MINGW64 (defined(__MINGW64__))
# define V8_CC_MINGW (V8_CC_MINGW32 || V8_CC_MINGW64)
# 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_NOINLINE (V8_GNUC_PREREQ(3, 4, 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 \
(!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
// value. Current versions of g++ do not correctly set __cplusplus, so we c heck // value. Current versions of g++ do not correctly set __cplusplus, so we c heck
// both for forward compatibility. // both for forward compatibility.
# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
skipping to change at line 201 skipping to change at line 223
# define V8_HAS___ALIGNOF 1 # define V8_HAS___ALIGNOF 1
// Override control was added with Visual Studio 2005, but // Override control was added with Visual Studio 2005, but
// Visual Studio 2010 and earlier spell "final" as "sealed". // Visual Studio 2010 and earlier spell "final" as "sealed".
# define V8_HAS_CXX11_FINAL (_MSC_VER >= 1700) # define V8_HAS_CXX11_FINAL (_MSC_VER >= 1700)
# define V8_HAS_CXX11_OVERRIDE (_MSC_VER >= 1400) # define V8_HAS_CXX11_OVERRIDE (_MSC_VER >= 1400)
# define V8_HAS_SEALED (_MSC_VER >= 1400) # define V8_HAS_SEALED (_MSC_VER >= 1400)
# define V8_HAS_DECLSPEC_ALIGN 1 # define V8_HAS_DECLSPEC_ALIGN 1
# define V8_HAS_DECLSPEC_DEPRECATED (_MSC_VER >= 1300) # define V8_HAS_DECLSPEC_DEPRECATED (_MSC_VER >= 1300)
# define V8_HAS_DECLSPEC_NOINLINE 1
# define V8_HAS___FORCEINLINE 1 # define V8_HAS___FORCEINLINE 1
#endif #endif
// ------------------------------------------------------------------------ ----- // ------------------------------------------------------------------------ -----
// Helper macros // Helper macros
// A macro used to make better inlining. Don't bother for debug builds. // A macro used to make better inlining. Don't bother for debug builds.
#if !defined(DEBUG) && V8_HAS_ATTRIBUTE_ALWAYS_INLINE #if !defined(DEBUG) && V8_HAS_ATTRIBUTE_ALWAYS_INLINE
# define V8_INLINE(declarator) inline __attribute__((always_inline)) declar ator # define V8_INLINE(declarator) inline __attribute__((always_inline)) declar ator
#elif !defined(DEBUG) && V8_HAS___FORCEINLINE #elif !defined(DEBUG) && V8_HAS___FORCEINLINE
# define V8_INLINE(declarator) __forceinline declarator # define V8_INLINE(declarator) __forceinline declarator
#else #else
# define V8_INLINE(declarator) inline declarator # define V8_INLINE(declarator) inline declarator
#endif #endif
// A macro used to tell the compiler to never inline a particular function.
// Don't bother for debug builds.
#if !defined(DEBUG) && V8_HAS_ATTRIBUTE_NOINLINE
# define V8_NOINLINE(declarator) __attribute__((noinline)) declarator
#elif !defined(DEBUG) && V8_HAS_DECLSPEC_NOINLINE
# define V8_NOINLINE(declarator) __declspec(noinline) declarator
#else
# define V8_NOINLINE(declarator) declarator
#endif
// A macro to mark classes or functions as deprecated. // A macro to mark classes or functions as deprecated.
#if !V8_DISABLE_DEPRECATIONS && V8_HAS_ATTRIBUTE_DEPRECATED #if !V8_DISABLE_DEPRECATIONS && V8_HAS_ATTRIBUTE_DEPRECATED
# define V8_DEPRECATED(declarator) declarator __attribute__((deprecated)) # define V8_DEPRECATED(declarator) declarator __attribute__((deprecated))
#elif !V8_DISABLE_DEPRECATIONS && V8_HAS_DECLSPEC_DEPRECATED #elif !V8_DISABLE_DEPRECATIONS && V8_HAS_DECLSPEC_DEPRECATED
# define V8_DEPRECATED(declarator) __declspec(deprecated) declarator # define V8_DEPRECATED(declarator) __declspec(deprecated) declarator
#else #else
# define V8_DEPRECATED(declarator) declarator # define V8_DEPRECATED(declarator) declarator
#endif #endif
// Annotate a function indicating the caller must examine the return value.
// Use like:
// int foo() V8_WARN_UNUSED_RESULT;
#if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT
# define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */
#endif
// A macro to provide the compiler with branch prediction information. // A macro to provide the compiler with branch prediction information.
#if V8_HAS_BUILTIN_EXPECT #if V8_HAS_BUILTIN_EXPECT
# define V8_UNLIKELY(condition) (__builtin_expect(!!(condition), 0)) # define V8_UNLIKELY(condition) (__builtin_expect(!!(condition), 0))
# define V8_LIKELY(condition) (__builtin_expect(!!(condition), 1)) # define V8_LIKELY(condition) (__builtin_expect(!!(condition), 1))
#else #else
# define V8_UNLIKELY(condition) (condition) # define V8_UNLIKELY(condition) (condition)
# define V8_LIKELY(condition) (condition) # define V8_LIKELY(condition) (condition)
#endif #endif
// A macro to specify that a method is deleted from the corresponding class . // A macro to specify that a method is deleted from the corresponding class .
 End of changes. 11 change blocks. 
16 lines changed or deleted 66 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/