v8.h   v8.h 
skipping to change at line 2803 skipping to change at line 2803
// Fast JS primitive setters // Fast JS primitive setters
V8_INLINE(void SetNull()); V8_INLINE(void SetNull());
V8_INLINE(void SetUndefined()); V8_INLINE(void SetUndefined());
// Convenience getter for Isolate // Convenience getter for Isolate
V8_INLINE(Isolate* GetIsolate()); V8_INLINE(Isolate* GetIsolate());
private: private:
template<class F> friend class ReturnValue; template<class F> friend class ReturnValue;
template<class F> friend class FunctionCallbackInfo; template<class F> friend class FunctionCallbackInfo;
template<class F> friend class PropertyCallbackInfo; template<class F> friend class PropertyCallbackInfo;
V8_INLINE(internal::Object* GetDefaultValue());
V8_INLINE(explicit ReturnValue(internal::Object** slot)); V8_INLINE(explicit ReturnValue(internal::Object** slot));
internal::Object** value_; internal::Object** value_;
}; };
/** /**
* The argument information given to function call callbacks. This * The argument information given to function call callbacks. This
* class provides access to information about the context of the call, * class provides access to information about the context of the call,
* including the receiver, the number and values of arguments, and * including the receiver, the number and values of arguments, and
* the holder of the function. * the holder of the function.
*/ */
skipping to change at line 2826 skipping to change at line 2827
V8_INLINE(int Length() const); V8_INLINE(int Length() const);
V8_INLINE(Local<Value> operator[](int i) const); V8_INLINE(Local<Value> operator[](int i) const);
V8_INLINE(Local<Function> Callee() const); V8_INLINE(Local<Function> Callee() const);
V8_INLINE(Local<Object> This() const); V8_INLINE(Local<Object> This() const);
V8_INLINE(Local<Object> Holder() const); V8_INLINE(Local<Object> Holder() const);
V8_INLINE(bool IsConstructCall() const); V8_INLINE(bool IsConstructCall() const);
V8_INLINE(Local<Value> Data() const); V8_INLINE(Local<Value> Data() const);
V8_INLINE(Isolate* GetIsolate() const); V8_INLINE(Isolate* GetIsolate() const);
V8_INLINE(ReturnValue<T> GetReturnValue() const); V8_INLINE(ReturnValue<T> GetReturnValue() const);
// This shouldn't be public, but the arm compiler needs it. // This shouldn't be public, but the arm compiler needs it.
static const int kArgsLength = 5; static const int kArgsLength = 6;
protected: protected:
friend class internal::FunctionCallbackArguments; friend class internal::FunctionCallbackArguments;
friend class internal::CustomArguments<FunctionCallbackInfo>; friend class internal::CustomArguments<FunctionCallbackInfo>;
static const int kReturnValueIndex = 0; static const int kReturnValueIndex = 0;
static const int kIsolateIndex = -1; static const int kReturnValueDefaultValueIndex = -1;
static const int kDataIndex = -2; static const int kIsolateIndex = -2;
static const int kCalleeIndex = -3; static const int kDataIndex = -3;
static const int kHolderIndex = -4; static const int kCalleeIndex = -4;
static const int kHolderIndex = -5;
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_;
}; };
skipping to change at line 2869 skipping to change at line 2871
*/ */
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);
V8_INLINE(Local<Object> Holder() const); V8_INLINE(Local<Object> Holder() const);
V8_INLINE(ReturnValue<T> GetReturnValue() const); V8_INLINE(ReturnValue<T> GetReturnValue() const);
// This shouldn't be public, but the arm compiler needs it. // This shouldn't be public, but the arm compiler needs it.
static const int kArgsLength = 5; static const int kArgsLength = 6;
protected: protected:
friend class MacroAssembler; friend class MacroAssembler;
friend class internal::PropertyCallbackArguments; friend class internal::PropertyCallbackArguments;
friend class internal::CustomArguments<PropertyCallbackInfo>; friend class internal::CustomArguments<PropertyCallbackInfo>;
static const int kThisIndex = 0; static const int kThisIndex = 0;
static const int kHolderIndex = -1; static const int kHolderIndex = -1;
static const int kDataIndex = -2; static const int kDataIndex = -2;
static const int kReturnValueIndex = -3; static const int kReturnValueIndex = -3;
static const int kIsolateIndex = -4; static const int kReturnValueDefaultValueIndex = -4;
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 V8EXPORT AccessorInfo : public PropertyCallbackInfo<Value> { class V8EXPORT AccessorInfo : public PropertyCallbackInfo<Value> {
private: private:
friend class internal::PropertyCallbackArguments; friend class internal::PropertyCallbackArguments;
V8_INLINE(AccessorInfo(internal::Object** args)) V8_INLINE(AccessorInfo(internal::Object** args))
skipping to change at line 5527 skipping to change at line 5530
} }
template<typename T> template<typename T>
ReturnValue<T>::ReturnValue(internal::Object** slot) : value_(slot) {} ReturnValue<T>::ReturnValue(internal::Object** slot) : value_(slot) {}
template<typename T> template<typename T>
template<typename S> template<typename S>
void ReturnValue<T>::Set(const Persistent<S>& handle) { void ReturnValue<T>::Set(const Persistent<S>& handle) {
TYPE_CHECK(T, S); TYPE_CHECK(T, S);
if (V8_UNLIKELY(handle.IsEmpty())) { if (V8_UNLIKELY(handle.IsEmpty())) {
SetUndefined(); *value_ = GetDefaultValue();
} else { } else {
*value_ = *reinterpret_cast<internal::Object**>(*handle); *value_ = *reinterpret_cast<internal::Object**>(*handle);
} }
} }
template<typename T> template<typename T>
template<typename S> template<typename S>
void ReturnValue<T>::Set(const Handle<S> handle) { void ReturnValue<T>::Set(const Handle<S> handle) {
TYPE_CHECK(T, S); TYPE_CHECK(T, S);
if (V8_UNLIKELY(handle.IsEmpty())) { if (V8_UNLIKELY(handle.IsEmpty())) {
SetUndefined(); *value_ = GetDefaultValue();
} else { } else {
*value_ = *reinterpret_cast<internal::Object**>(*handle); *value_ = *reinterpret_cast<internal::Object**>(*handle);
} }
} }
template<typename T> template<typename T>
void ReturnValue<T>::Set(double i) { void ReturnValue<T>::Set(double i) {
Set(Number::New(GetIsolate(), i)); Set(Number::New(GetIsolate(), i));
} }
skipping to change at line 5597 skipping to change at line 5600
} }
template<typename T> template<typename T>
void ReturnValue<T>::SetUndefined() { void ReturnValue<T>::SetUndefined() {
typedef internal::Internals I; typedef internal::Internals I;
*value_ = *I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex); *value_ = *I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex);
} }
template<typename T> template<typename T>
Isolate* ReturnValue<T>::GetIsolate() { Isolate* ReturnValue<T>::GetIsolate() {
// Isolate is always the pointer below value_ on the stack. // Isolate is always the pointer below the default value on the stack.
return *reinterpret_cast<Isolate**>(&value_[-1]); return *reinterpret_cast<Isolate**>(&value_[-2]);
}
template<typename T>
internal::Object* ReturnValue<T>::GetDefaultValue() {
// Default value is always the pointer below value_ on the stack.
return value_[-1];
} }
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),
 End of changes. 8 change blocks. 
11 lines changed or deleted 20 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/