v8.h   v8.h 
skipping to change at line 934 skipping to change at line 934
}; };
/** /**
* The origin, within a file, of a script. * The origin, within a file, of a script.
*/ */
class ScriptOrigin { class ScriptOrigin {
public: public:
V8_INLINE(ScriptOrigin( V8_INLINE(ScriptOrigin(
Handle<Value> resource_name, Handle<Value> resource_name,
Handle<Integer> resource_line_offset = Handle<Integer>(), Handle<Integer> resource_line_offset = Handle<Integer>(),
Handle<Integer> resource_column_offset = Handle<Integer>())) Handle<Integer> resource_column_offset = Handle<Integer>(),
Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>()))
: resource_name_(resource_name), : resource_name_(resource_name),
resource_line_offset_(resource_line_offset), resource_line_offset_(resource_line_offset),
resource_column_offset_(resource_column_offset) { } resource_column_offset_(resource_column_offset),
resource_is_shared_cross_origin_(resource_is_shared_cross_origin) {
}
V8_INLINE(Handle<Value> ResourceName() const); V8_INLINE(Handle<Value> ResourceName() const);
V8_INLINE(Handle<Integer> ResourceLineOffset() const); V8_INLINE(Handle<Integer> ResourceLineOffset() const);
V8_INLINE(Handle<Integer> ResourceColumnOffset() const); V8_INLINE(Handle<Integer> ResourceColumnOffset() const);
V8_INLINE(Handle<Boolean> ResourceIsSharedCrossOrigin() const);
private: private:
Handle<Value> resource_name_; Handle<Value> resource_name_;
Handle<Integer> resource_line_offset_; Handle<Integer> resource_line_offset_;
Handle<Integer> resource_column_offset_; Handle<Integer> resource_column_offset_;
Handle<Boolean> resource_is_shared_cross_origin_;
}; };
/** /**
* A compiled JavaScript script. * A compiled JavaScript script.
*/ */
class V8EXPORT Script { class V8EXPORT Script {
public: public:
/** /**
* Compiles the specified script (context-independent). * Compiles the specified script (context-independent).
* *
skipping to change at line 1120 skipping to change at line 1124
* the error occurred. * the error occurred.
*/ */
int GetStartColumn() const; int GetStartColumn() const;
/** /**
* Returns the index within the line of the last character where * Returns the index within the line of the last character where
* the error occurred. * the error occurred.
*/ */
int GetEndColumn() const; int GetEndColumn() const;
/**
* Passes on the value set by the embedder when it fed the script from wh
ich
* this Message was generated to V8.
*/
bool IsSharedCrossOrigin() const;
// TODO(1245381): Print to a string instead of on a FILE. // TODO(1245381): Print to a string instead of on a FILE.
static void PrintCurrentStackTrace(FILE* out); static void PrintCurrentStackTrace(FILE* out);
static const int kNoLineNumberInfo = 0; static const int kNoLineNumberInfo = 0;
static const int kNoColumnInfo = 0; static const int kNoColumnInfo = 0;
}; };
/** /**
* Representation of a JavaScript stack trace. The information collected is a * Representation of a JavaScript stack trace. The information collected is a
* snapshot of the execution stack and the information remains valid after * snapshot of the execution stack and the information remains valid after
skipping to change at line 2371 skipping to change at line 2381
* V8::SetArrayBufferAllocator prior to creation of a first ArrayBuffer. * V8::SetArrayBufferAllocator prior to creation of a first ArrayBuffer.
* *
* This API is experimental and may change significantly. * This API is experimental and may change significantly.
*/ */
class V8EXPORT Allocator { // NOLINT class V8EXPORT Allocator { // NOLINT
public: public:
virtual ~Allocator() {} virtual ~Allocator() {}
/** /**
* Allocate |length| bytes. Return NULL if allocation is not successful . * Allocate |length| bytes. Return NULL if allocation is not successful .
* Memory should be initialized to zeroes.
*/ */
virtual void* Allocate(size_t length) = 0; virtual void* Allocate(size_t length) = 0;
/**
* Allocate |length| bytes. Return NULL if allocation is not successful
.
* Memory does not have to be initialized.
*/
virtual void* AllocateUninitialized(size_t length) {
// Override with call to |Allocate| for compatibility
// with legacy version.
return Allocate(length);
}
/** /**
* Free the memory pointed to |data|. That memory is guaranteed to be * Free the memory pointed to |data|. That memory is guaranteed to be
* previously allocated by |Allocate|. * previously allocated by |Allocate|.
*/ */
virtual void Free(void* data) = 0; virtual void Free(void* data) = 0;
}; };
/** /**
* The contents of an |ArrayBuffer|. Externalization of |ArrayBuffer| * The contents of an |ArrayBuffer|. Externalization of |ArrayBuffer|
* returns an instance of this class, populated, with a pointer to data * returns an instance of this class, populated, with a pointer to data
skipping to change at line 2676 skipping to change at line 2698
static void CheckCast(Value* obj); static void CheckCast(Value* obj);
}; };
/** /**
* An instance of the built-in Date constructor (ECMA-262, 15.9). * An instance of the built-in Date constructor (ECMA-262, 15.9).
*/ */
class V8EXPORT Date : public Object { class V8EXPORT Date : public Object {
public: public:
static Local<Value> New(double time); static Local<Value> New(double time);
// Deprecated, use Date::ValueOf() instead.
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
double NumberValue() const { return ValueOf(); }
/** /**
* A specialization of Value::NumberValue that is more efficient * A specialization of Value::NumberValue that is more efficient
* because we know the structure of this object. * because we know the structure of this object.
*/ */
double NumberValue() const; double ValueOf() const;
V8_INLINE(static Date* Cast(v8::Value* obj)); V8_INLINE(static Date* Cast(v8::Value* obj));
/** /**
* Notification that the embedder has changed the time zone, * Notification that the embedder has changed the time zone,
* daylight savings time, or other date / time configuration * daylight savings time, or other date / time configuration
* parameters. V8 keeps a cache of various values used for * parameters. V8 keeps a cache of various values used for
* date / time computation. This notification will reset * date / time computation. This notification will reset
* those cached values for the current context so that date / * those cached values for the current context so that date /
* time configuration changes would be reflected in the Date * time configuration changes would be reflected in the Date
skipping to change at line 2709 skipping to change at line 2735
static void CheckCast(v8::Value* obj); static void CheckCast(v8::Value* obj);
}; };
/** /**
* A Number object (ECMA-262, 4.3.21). * A Number object (ECMA-262, 4.3.21).
*/ */
class V8EXPORT NumberObject : public Object { class V8EXPORT NumberObject : public Object {
public: public:
static Local<Value> New(double value); static Local<Value> New(double value);
// Deprecated, use NumberObject::ValueOf() instead.
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
double NumberValue() const { return ValueOf(); }
/** /**
* Returns the Number held by the object. * Returns the Number held by the object.
*/ */
double NumberValue() const; double ValueOf() const;
V8_INLINE(static NumberObject* Cast(v8::Value* obj)); V8_INLINE(static NumberObject* Cast(v8::Value* obj));
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(v8::Value* obj);
}; };
/** /**
* A Boolean object (ECMA-262, 4.3.15). * A Boolean object (ECMA-262, 4.3.15).
*/ */
class V8EXPORT BooleanObject : public Object { class V8EXPORT BooleanObject : public Object {
public: public:
static Local<Value> New(bool value); static Local<Value> New(bool value);
// Deprecated, use BooleanObject::ValueOf() instead.
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
bool BooleanValue() const { return ValueOf(); }
/** /**
* Returns the Boolean held by the object. * Returns the Boolean held by the object.
*/ */
bool BooleanValue() const; bool ValueOf() const;
V8_INLINE(static BooleanObject* Cast(v8::Value* obj)); V8_INLINE(static BooleanObject* Cast(v8::Value* obj));
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(v8::Value* obj);
}; };
/** /**
* A String object (ECMA-262, 4.3.18). * A String object (ECMA-262, 4.3.18).
*/ */
class V8EXPORT StringObject : public Object { class V8EXPORT StringObject : public Object {
public: public:
static Local<Value> New(Handle<String> value); static Local<Value> New(Handle<String> value);
// Deprecated, use StringObject::ValueOf() instead.
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
Local<String> StringValue() const { return ValueOf(); }
/** /**
* Returns the String held by the object. * Returns the String held by the object.
*/ */
Local<String> StringValue() const; Local<String> ValueOf() const;
V8_INLINE(static StringObject* Cast(v8::Value* obj)); V8_INLINE(static StringObject* Cast(v8::Value* obj));
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(v8::Value* obj);
}; };
/** /**
* A Symbol object (ECMA-262 edition 6). * A Symbol object (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 V8EXPORT SymbolObject : public Object { class V8EXPORT SymbolObject : public Object {
public: public:
static Local<Value> New(Isolate* isolate, Handle<Symbol> value); static Local<Value> New(Isolate* isolate, Handle<Symbol> value);
// Deprecated, use SymbolObject::ValueOf() instead.
// TODO(svenpanne) Actually deprecate when Chrome is adapted.
Local<Symbol> SymbolValue() const { return ValueOf(); }
/** /**
* Returns the Symbol held by the object. * Returns the Symbol held by the object.
*/ */
Local<Symbol> SymbolValue() const; Local<Symbol> ValueOf() const;
V8_INLINE(static SymbolObject* Cast(v8::Value* obj)); V8_INLINE(static SymbolObject* Cast(v8::Value* obj));
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(v8::Value* obj);
}; };
/** /**
* An instance of the built-in RegExp constructor (ECMA-262, 15.10). * An instance of the built-in RegExp constructor (ECMA-262, 15.10).
*/ */
skipping to change at line 5286 skipping to change at line 5328
static const int kStringEncodingMask = 0x4; static const int kStringEncodingMask = 0x4;
static const int kExternalTwoByteRepresentationTag = 0x02; static const int kExternalTwoByteRepresentationTag = 0x02;
static const int kExternalAsciiRepresentationTag = 0x06; static const int kExternalAsciiRepresentationTag = 0x06;
static const int kIsolateEmbedderDataOffset = 1 * kApiPointerSize; static const int kIsolateEmbedderDataOffset = 1 * kApiPointerSize;
static const int kIsolateRootsOffset = 3 * kApiPointerSize; static const int kIsolateRootsOffset = 3 * kApiPointerSize;
static const int kUndefinedValueRootIndex = 5; static const int kUndefinedValueRootIndex = 5;
static const int kNullValueRootIndex = 7; static const int kNullValueRootIndex = 7;
static const int kTrueValueRootIndex = 8; static const int kTrueValueRootIndex = 8;
static const int kFalseValueRootIndex = 9; static const int kFalseValueRootIndex = 9;
static const int kEmptyStringRootIndex = 134; static const int kEmptyStringRootIndex = 135;
static const int kNodeClassIdOffset = 1 * kApiPointerSize; static const int kNodeClassIdOffset = 1 * kApiPointerSize;
static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
static const int kNodeStateMask = 0xf; static const int kNodeStateMask = 0xf;
static const int kNodeStateIsWeakValue = 2; static const int kNodeStateIsWeakValue = 2;
static const int kNodeStateIsNearDeathValue = 4; static const int kNodeStateIsNearDeathValue = 4;
static const int kNodeIsIndependentShift = 4; static const int kNodeIsIndependentShift = 4;
static const int kNodeIsPartiallyDependentShift = 5; static const int kNodeIsPartiallyDependentShift = 5;
static const int kJSObjectType = 0xb1; static const int kJSObjectType = 0xb1;
skipping to change at line 5825 skipping to change at line 5867
} }
Handle<Integer> ScriptOrigin::ResourceLineOffset() const { Handle<Integer> ScriptOrigin::ResourceLineOffset() const {
return resource_line_offset_; return resource_line_offset_;
} }
Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { Handle<Integer> ScriptOrigin::ResourceColumnOffset() const {
return resource_column_offset_; return resource_column_offset_;
} }
Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const {
return resource_is_shared_cross_origin_;
}
Handle<Boolean> Boolean::New(bool value) { Handle<Boolean> Boolean::New(bool value) {
return value ? True() : False(); return value ? True() : False();
} }
void Template::Set(const char* name, v8::Handle<Data> value) { void Template::Set(const char* name, v8::Handle<Data> value) {
Set(v8::String::New(name), value); Set(v8::String::New(name), value);
} }
Local<Value> Object::GetInternalField(int index) { Local<Value> Object::GetInternalField(int index) {
#ifndef V8_ENABLE_CHECKS #ifndef V8_ENABLE_CHECKS
 End of changes. 19 change blocks. 
8 lines changed or deleted 57 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/