v8-preparser.h   v8-preparser.h 
skipping to change at line 115 skipping to change at line 115
// UnicodeInputStream. The max_stack_size limits the amount of stack // UnicodeInputStream. The max_stack_size limits the amount of stack
// space that the preparser is allowed to use. If the preparser uses // space that the preparser is allowed to use. If the preparser uses
// more stack space than the limit provided, the result's stack_overflow() // more stack space than the limit provided, the result's stack_overflow()
// method will return true. Otherwise the result contains preparser // method will return true. Otherwise the result contains preparser
// data that can be used by the V8 parser to speed up parsing. // data that can be used by the V8 parser to speed up parsing.
PreParserData V8EXPORT Preparse(UnicodeInputStream* input, PreParserData V8EXPORT Preparse(UnicodeInputStream* input,
size_t max_stack_size); size_t max_stack_size);
} // namespace v8. } // namespace v8.
#undef V8EXPORT
#endif // PREPARSER_H #endif // PREPARSER_H
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 v8-profiler.h   v8-profiler.h 
skipping to change at line 173 skipping to change at line 173
/** /**
* A note on security tokens usage. As scripts from different * A note on security tokens usage. As scripts from different
* origins can run inside a single V8 instance, it is possible to * origins can run inside a single V8 instance, it is possible to
* have functions from different security contexts intermixed in a * have functions from different security contexts intermixed in a
* single CPU profile. To avoid exposing function names belonging to * single CPU profile. To avoid exposing function names belonging to
* other contexts, filtering by security token is performed while * other contexts, filtering by security token is performed while
* obtaining profiling results. * obtaining profiling results.
*/ */
/** Deprecated. Use GetProfileCount instead. */ /** Deprecated. Use GetProfileCount instead. */
static int GetProfilesCount(); V8_DEPRECATED(static int GetProfilesCount());
/** /**
* Returns the number of profiles collected (doesn't include * Returns the number of profiles collected (doesn't include
* profiles that are being collected at the moment of call.) * profiles that are being collected at the moment of call.)
*/ */
int GetProfileCount(); int GetProfileCount();
/** Deprecated. Use GetCpuProfile instead. */ /** Deprecated. Use GetCpuProfile instead. */
static const CpuProfile* GetProfile( V8_DEPRECATED(static const CpuProfile* GetProfile(
int index, int index,
Handle<Value> security_token = Handle<Value>()); Handle<Value> security_token = Handle<Value>()));
/** Returns a profile by index. */ /** Returns a profile by index. */
const CpuProfile* GetCpuProfile( const CpuProfile* GetCpuProfile(
int index, int index,
Handle<Value> security_token = Handle<Value>()); Handle<Value> security_token = Handle<Value>());
/** Deprecated. Use FindProfile instead. */ /** Deprecated. Use FindProfile instead. */
static const CpuProfile* FindProfile( V8_DEPRECATED(static const CpuProfile* FindProfile(
unsigned uid, unsigned uid,
Handle<Value> security_token = Handle<Value>()); Handle<Value> security_token = Handle<Value>()));
/** Returns a profile by uid. */ /** Returns a profile by uid. */
const CpuProfile* FindCpuProfile( const CpuProfile* FindCpuProfile(
unsigned uid, unsigned uid,
Handle<Value> security_token = Handle<Value>()); Handle<Value> security_token = Handle<Value>());
/** Deprecated. Use StartCpuProfiling instead. */ /** Deprecated. Use StartCpuProfiling instead. */
static void StartProfiling(Handle<String> title, bool record_samples = fa V8_DEPRECATED(static void StartProfiling(Handle<String> title,
lse); bool record_samples = false));
/** /**
* Starts collecting CPU profile. Title may be an empty string. It * Starts collecting CPU profile. Title may be an empty string. It
* is allowed to have several profiles being collected at * is allowed to have several profiles being collected at
* once. Attempts to start collecting several profiles with the same * once. Attempts to start collecting several profiles with the same
* title are silently ignored. While collecting a profile, functions * title are silently ignored. While collecting a profile, functions
* from all security contexts are included in it. The token-based * from all security contexts are included in it. The token-based
* filtering is only performed when querying for a profile. * filtering is only performed when querying for a profile.
* *
* |record_samples| parameter controls whether individual samples should * |record_samples| parameter controls whether individual samples should
* be recorded in addition to the aggregated tree. * be recorded in addition to the aggregated tree.
*/ */
void StartCpuProfiling(Handle<String> title, bool record_samples = false) ; void StartCpuProfiling(Handle<String> title, bool record_samples = false) ;
/** Deprecated. Use StopCpuProfiling instead. */ /** Deprecated. Use StopCpuProfiling instead. */
static const CpuProfile* StopProfiling( V8_DEPRECATED(static const CpuProfile* StopProfiling(
Handle<String> title, Handle<String> title,
Handle<Value> security_token = Handle<Value>()); Handle<Value> security_token = Handle<Value>()));
/** /**
* Stops collecting CPU profile with a given title and returns it. * Stops collecting CPU profile with a given title and returns it.
* If the title given is empty, finishes the last profile started. * If the title given is empty, finishes the last profile started.
*/ */
const CpuProfile* StopCpuProfiling( const CpuProfile* StopCpuProfiling(
Handle<String> title, Handle<String> title,
Handle<Value> security_token = Handle<Value>()); Handle<Value> security_token = Handle<Value>());
/** Deprecated. Use DeleteAllCpuProfiles instead. */ /** Deprecated. Use DeleteAllCpuProfiles instead. */
static void DeleteAllProfiles(); V8_DEPRECATED(static void DeleteAllProfiles());
/** /**
* Deletes all existing profiles, also cancelling all profiling * Deletes all existing profiles, also cancelling all profiling
* activity. All previously returned pointers to profiles and their * activity. All previously returned pointers to profiles and their
* contents become invalid after this call. * contents become invalid after this call.
*/ */
void DeleteAllCpuProfiles(); void DeleteAllCpuProfiles();
private: private:
CpuProfiler(); CpuProfiler();
~CpuProfiler(); ~CpuProfiler();
skipping to change at line 420 skipping to change at line 421
/** /**
* Callback function invoked for obtaining RetainedObjectInfo for * Callback function invoked for obtaining RetainedObjectInfo for
* the given JavaScript wrapper object. It is prohibited to enter V8 * the given JavaScript wrapper object. It is prohibited to enter V8
* while the callback is running: only getters on the handle and * while the callback is running: only getters on the handle and
* GetPointerFromInternalField on the objects are allowed. * GetPointerFromInternalField on the objects are allowed.
*/ */
typedef RetainedObjectInfo* (*WrapperInfoCallback) typedef RetainedObjectInfo* (*WrapperInfoCallback)
(uint16_t class_id, Handle<Value> wrapper); (uint16_t class_id, Handle<Value> wrapper);
/** Deprecated. Use GetSnapshotCount instead. */ /** Deprecated. Use GetSnapshotCount instead. */
static int GetSnapshotsCount(); V8_DEPRECATED(static int GetSnapshotsCount());
/** Returns the number of snapshots taken. */ /** Returns the number of snapshots taken. */
int GetSnapshotCount(); int GetSnapshotCount();
/** Deprecated. Use GetHeapSnapshot instead. */ /** Deprecated. Use GetHeapSnapshot instead. */
static const HeapSnapshot* GetSnapshot(int index); V8_DEPRECATED(static const HeapSnapshot* GetSnapshot(int index));
/** Returns a snapshot by index. */ /** Returns a snapshot by index. */
const HeapSnapshot* GetHeapSnapshot(int index); const HeapSnapshot* GetHeapSnapshot(int index);
/** Deprecated. Use FindHeapSnapshot instead. */ /** Deprecated. Use FindHeapSnapshot instead. */
static const HeapSnapshot* FindSnapshot(unsigned uid); V8_DEPRECATED(static const HeapSnapshot* FindSnapshot(unsigned uid));
/** Returns a profile by uid. */ /** Returns a profile by uid. */
const HeapSnapshot* FindHeapSnapshot(unsigned uid); const HeapSnapshot* FindHeapSnapshot(unsigned uid);
/** Deprecated. Use GetObjectId instead. */ /** Deprecated. Use GetObjectId instead. */
static SnapshotObjectId GetSnapshotObjectId(Handle<Value> value); V8_DEPRECATED(static SnapshotObjectId GetSnapshotObjectId(
Handle<Value> value));
/** /**
* Returns SnapshotObjectId for a heap object referenced by |value| if * Returns SnapshotObjectId for a heap object referenced by |value| if
* it has been seen by the heap profiler, kUnknownObjectId otherwise. * it has been seen by the heap profiler, kUnknownObjectId otherwise.
*/ */
SnapshotObjectId GetObjectId(Handle<Value> value); SnapshotObjectId GetObjectId(Handle<Value> value);
/** /**
* A constant for invalid SnapshotObjectId. GetSnapshotObjectId will retu rn * A constant for invalid SnapshotObjectId. GetSnapshotObjectId will retu rn
* it in case heap profiler cannot find id for the object passed as * it in case heap profiler cannot find id for the object passed as
* parameter. HeapSnapshot::GetNodeById will always return NULL for such id. * parameter. HeapSnapshot::GetNodeById will always return NULL for such id.
skipping to change at line 464 skipping to change at line 466
/** /**
* Returns name to be used in the heap snapshot for given node. Returne d * Returns name to be used in the heap snapshot for given node. Returne d
* string must stay alive until snapshot collection is completed. * string must stay alive until snapshot collection is completed.
*/ */
virtual const char* GetName(Handle<Object> object) = 0; virtual const char* GetName(Handle<Object> object) = 0;
protected: protected:
virtual ~ObjectNameResolver() {} virtual ~ObjectNameResolver() {}
}; };
/** Deprecated. Use TakeHeapSnapshot instead. */ /** Deprecated. Use TakeHeapSnapshot instead. */
static const HeapSnapshot* TakeSnapshot( V8_DEPRECATED(static const HeapSnapshot* TakeSnapshot(
Handle<String> title, Handle<String> title,
HeapSnapshot::Type type = HeapSnapshot::kFull, HeapSnapshot::Type type = HeapSnapshot::kFull,
ActivityControl* control = NULL, ActivityControl* control = NULL,
ObjectNameResolver* global_object_name_resolver = NULL); ObjectNameResolver* global_object_name_resolver = NULL));
/** /**
* Takes a heap snapshot and returns it. Title may be an empty string. * Takes a heap snapshot and returns it. Title may be an empty string.
*/ */
const HeapSnapshot* TakeHeapSnapshot( const HeapSnapshot* TakeHeapSnapshot(
Handle<String> title, Handle<String> title,
ActivityControl* control = NULL, ActivityControl* control = NULL,
ObjectNameResolver* global_object_name_resolver = NULL); ObjectNameResolver* global_object_name_resolver = NULL);
/** Deprecated. Use StartTrackingHeapObjects instead. */ /** Deprecated. Use StartTrackingHeapObjects instead. */
static void StartHeapObjectsTracking(); V8_DEPRECATED(static void StartHeapObjectsTracking());
/** /**
* Starts tracking of heap objects population statistics. After calling * Starts tracking of heap objects population statistics. After calling
* this method, all heap objects relocations done by the garbage collecto r * this method, all heap objects relocations done by the garbage collecto r
* are being registered. * are being registered.
*/ */
void StartTrackingHeapObjects(); void StartTrackingHeapObjects();
/** Deprecated. Use GetHeapStats instead. */ /** Deprecated. Use GetHeapStats instead. */
static SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); V8_DEPRECATED(static SnapshotObjectId PushHeapObjectsStats(
OutputStream* stream));
/** /**
* Adds a new time interval entry to the aggregated statistics array. The * Adds a new time interval entry to the aggregated statistics array. The
* time interval entry contains information on the current heap objects * time interval entry contains information on the current heap objects
* population size. The method also updates aggregated statistics and * population size. The method also updates aggregated statistics and
* reports updates for all previous time intervals via the OutputStream * reports updates for all previous time intervals via the OutputStream
* object. Updates on each time interval are provided as a stream of the * object. Updates on each time interval are provided as a stream of the
* HeapStatsUpdate structure instances. * HeapStatsUpdate structure instances.
* The return value of the function is the last seen heap object Id. * The return value of the function is the last seen heap object Id.
* *
* StartTrackingHeapObjects must be called before the first call to this * StartTrackingHeapObjects must be called before the first call to this
* method. * method.
*/ */
SnapshotObjectId GetHeapStats(OutputStream* stream); SnapshotObjectId GetHeapStats(OutputStream* stream);
/** Deprecated. Use StopTrackingHeapObjects instead. */ /** Deprecated. Use StopTrackingHeapObjects instead. */
static void StopHeapObjectsTracking(); V8_DEPRECATED(static void StopHeapObjectsTracking());
/** /**
* Stops tracking of heap objects population statistics, cleans up all * Stops tracking of heap objects population statistics, cleans up all
* collected data. StartHeapObjectsTracking must be called again prior to * collected data. StartHeapObjectsTracking must be called again prior to
* calling PushHeapObjectsStats next time. * calling PushHeapObjectsStats next time.
*/ */
void StopTrackingHeapObjects(); void StopTrackingHeapObjects();
/** Deprecated. Use DeleteAllHeapSnapshots instead. */ /** Deprecated. Use DeleteAllHeapSnapshots instead. */
static void DeleteAllSnapshots(); V8_DEPRECATED(static void DeleteAllSnapshots());
/** /**
* Deletes all snapshots taken. All previously returned pointers to * Deletes all snapshots taken. All previously returned pointers to
* snapshots and their contents become invalid after this call. * snapshots and their contents become invalid after this call.
*/ */
void DeleteAllHeapSnapshots(); void DeleteAllHeapSnapshots();
/** Deprecated. Use SetWrapperClassInfoProvider instead. */ /** Deprecated. Use SetWrapperClassInfoProvider instead. */
static void DefineWrapperClass( V8_DEPRECATED(static void DefineWrapperClass(
uint16_t class_id, uint16_t class_id,
WrapperInfoCallback callback); WrapperInfoCallback callback));
/** Binds a callback to embedder's class ID. */ /** Binds a callback to embedder's class ID. */
void SetWrapperClassInfoProvider( void SetWrapperClassInfoProvider(
uint16_t class_id, uint16_t class_id,
WrapperInfoCallback callback); WrapperInfoCallback callback);
/** /**
* Default value of persistent handle class ID. Must not be used to * Default value of persistent handle class ID. Must not be used to
* define a class. Can be used to reset a class of a persistent * define a class. Can be used to reset a class of a persistent
* handle. * handle.
*/ */
static const uint16_t kPersistentHandleNoClassId = 0; static const uint16_t kPersistentHandleNoClassId = 0;
/** /**
* Deprecated. Returns the number of currently existing persistent handle s. * Deprecated. Returns the number of currently existing persistent handle s.
*/ */
static int GetPersistentHandleCount(); V8_DEPRECATED(static int GetPersistentHandleCount());
/** Deprecated. Use GetHeapProfilerMemorySize instead. */ /** Deprecated. Use GetHeapProfilerMemorySize instead. */
static size_t GetMemorySizeUsedByProfiler(); V8_DEPRECATED(static size_t GetMemorySizeUsedByProfiler());
/** Returns memory used for profiler internal data and snapshots. */ /** Returns memory used for profiler internal data and snapshots. */
size_t GetProfilerMemorySize(); size_t GetProfilerMemorySize();
private: private:
HeapProfiler(); HeapProfiler();
~HeapProfiler(); ~HeapProfiler();
HeapProfiler(const HeapProfiler&); HeapProfiler(const HeapProfiler&);
HeapProfiler& operator=(const HeapProfiler&); HeapProfiler& operator=(const HeapProfiler&);
}; };
 End of changes. 23 change blocks. 
24 lines changed or deleted 26 lines changed or added


 v8.h   v8.h 
skipping to change at line 130 skipping to change at line 130
class Object; class Object;
class ObjectOperationDescriptor; class ObjectOperationDescriptor;
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 SymbolObject;
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 Persistent; template <class T> class Persistent;
namespace internal { namespace internal {
class Arguments; class Arguments;
class Heap; class Heap;
skipping to change at line 757 skipping to change at line 759
* Returns the script id value. * Returns the script id value.
*/ */
Local<Value> Id(); Local<Value> Id();
/** /**
* Associate an additional data object with the script. This is mainly us ed * Associate an additional data object with the script. This is mainly us ed
* with the debugger as this data object is only available through the * with the debugger as this data object is only available through the
* debugger API. * debugger API.
*/ */
void SetData(Handle<String> data); void SetData(Handle<String> data);
/**
* Returns the name value of one Script.
*/
Handle<Value> GetScriptName();
/**
* Returns zero based line number of the code_pos location in the script.
* -1 will be returned if no information available.
*/
int GetLineNumber(int code_pos);
}; };
/** /**
* An error message. * An error message.
*/ */
class V8EXPORT Message { class V8EXPORT Message {
public: public:
Local<String> Get() const; Local<String> Get() const;
Local<String> GetSourceLine() const; Local<String> GetSourceLine() const;
skipping to change at line 961 skipping to change at line 974
*/ */
bool IsFalse() const; bool IsFalse() const;
/** /**
* Returns true if this value is an instance of the String type. * Returns true if this value is an instance of the String type.
* See ECMA-262 8.4. * See ECMA-262 8.4.
*/ */
V8_INLINE(bool IsString() const); V8_INLINE(bool IsString() const);
/** /**
* Returns true if this value is a symbol.
* This is an experimental feature.
*/
bool IsSymbol() const;
/**
* Returns true if this value is a function. * Returns true if this value is a function.
*/ */
bool IsFunction() const; bool IsFunction() const;
/** /**
* Returns true if this value is an array. * Returns true if this value is an array.
*/ */
bool IsArray() const; bool IsArray() const;
/** /**
skipping to change at line 1021 skipping to change at line 1040
* Returns true if this value is a Number object. * Returns true if this value is a Number object.
*/ */
bool IsNumberObject() const; bool IsNumberObject() const;
/** /**
* Returns true if this value is a String object. * Returns true if this value is a String object.
*/ */
bool IsStringObject() const; bool IsStringObject() const;
/** /**
* Returns true if this value is a Symbol object.
* This is an experimental feature.
*/
bool IsSymbolObject() const;
/**
* Returns true if this value is a NativeError. * Returns true if this value is a NativeError.
*/ */
bool IsNativeError() const; bool IsNativeError() const;
/** /**
* Returns true if this value is a RegExp. * Returns true if this value is a RegExp.
*/ */
bool IsRegExp() const; bool IsRegExp() const;
Local<Boolean> ToBoolean() const; Local<Boolean> ToBoolean() const;
skipping to change at line 1296 skipping to change at line 1321
/** /**
* Allocates a new string from either UTF-8 encoded or ASCII data. * Allocates a new string from either UTF-8 encoded or ASCII data.
* The second parameter 'length' gives the buffer length. If omitted, * The second parameter 'length' gives the buffer length. If omitted,
* the function calls 'strlen' to determine the buffer length. * the function calls 'strlen' to determine the buffer length.
*/ */
static Local<String> New(const char* data, int length = -1); static Local<String> New(const char* data, int length = -1);
/** Allocates a new string from 16-bit character codes.*/ /** Allocates a new string from 16-bit character codes.*/
static Local<String> New(const uint16_t* data, int length = -1); static Local<String> New(const uint16_t* data, int length = -1);
/** Creates a symbol. Returns one if it exists already.*/ /**
* Creates an internalized string (historically called a "symbol",
* not to be confused with ES6 symbols). Returns one if it exists already
.
* TODO(rossberg): Deprecate me when the new string API is here.
*/
static Local<String> NewSymbol(const char* data, int length = -1); static Local<String> NewSymbol(const char* data, int length = -1);
/** /**
* Creates a new string by concatenating the left and the right strings * Creates a new string by concatenating the left and the right strings
* passed in as parameters. * passed in as parameters.
*/ */
static Local<String> Concat(Handle<String> left, Handle<String> right); static Local<String> Concat(Handle<String> left, Handle<String> right);
/** /**
* Creates a new external string using the data defined in the given * Creates a new external string using the data defined in the given
skipping to change at line 1434 skipping to change at line 1463
}; };
private: private:
void VerifyExternalStringResourceBase(ExternalStringResourceBase* v, void VerifyExternalStringResourceBase(ExternalStringResourceBase* v,
Encoding encoding) const; Encoding encoding) const;
void VerifyExternalStringResource(ExternalStringResource* val) const; void VerifyExternalStringResource(ExternalStringResource* val) const;
static void CheckCast(v8::Value* obj); static void CheckCast(v8::Value* obj);
}; };
/** /**
* A JavaScript symbol (ECMA-262 edition 6)
*
* This is an experimental feature. Use at your own risk.
*/
class V8EXPORT Symbol : public Primitive {
public:
// 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);
V8_INLINE(static Symbol* Cast(v8::Value* obj));
private:
Symbol();
static void CheckCast(v8::Value* obj);
};
/**
* A JavaScript number value (ECMA-262, 4.3.20) * A JavaScript number value (ECMA-262, 4.3.20)
*/ */
class V8EXPORT Number : public Primitive { class V8EXPORT Number : public Primitive {
public: public:
double Value() const; double Value() const;
static Local<Number> New(double value); static Local<Number> New(double value);
V8_INLINE(static Number* Cast(v8::Value* obj)); V8_INLINE(static Number* Cast(v8::Value* obj));
private: private:
Number(); Number();
static void CheckCast(v8::Value* obj); static void CheckCast(v8::Value* obj);
skipping to change at line 1567 skipping to change at line 1618
Local<Value> Get(uint32_t index); Local<Value> Get(uint32_t index);
/** /**
* Gets the property attributes of a property which can be None or * Gets the property attributes of a property which can be None or
* any combination of ReadOnly, DontEnum and DontDelete. Returns * any combination of ReadOnly, DontEnum and DontDelete. Returns
* None when the property doesn't exist. * None when the property doesn't exist.
*/ */
PropertyAttribute GetPropertyAttributes(Handle<Value> key); PropertyAttribute GetPropertyAttributes(Handle<Value> key);
// TODO(1245389): Replace the type-specific versions of these bool Has(Handle<Value> key);
// functions with generic ones that accept a Handle<Value> key.
bool Has(Handle<String> key);
bool Delete(Handle<String> 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);
bool SetAccessor(Handle<String> name, bool SetAccessor(Handle<String> name,
skipping to change at line 1952 skipping to change at line 2001
*/ */
Local<String> StringValue() const; Local<String> StringValue() 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).
*
* This is an experimental feature. Use at your own risk.
*/
class V8EXPORT SymbolObject : public Object {
public:
static Local<Value> New(Isolate* isolate, Handle<Symbol> value);
/**
* Returns the Symbol held by the object.
*/
Local<Symbol> SymbolValue() const;
V8_INLINE(static SymbolObject* Cast(v8::Value* obj));
private:
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).
*/ */
class V8EXPORT RegExp : public Object { class V8EXPORT RegExp : public Object {
public: public:
/** /**
* Regular expression flag bits. They can be or'ed to enable a set * Regular expression flag bits. They can be or'ed to enable a set
* of flags. * of flags.
*/ */
enum Flags { enum Flags {
kNone = 0, kNone = 0,
skipping to change at line 3786 skipping to change at line 3855
* restore the connection between a global object and a context * restore the connection between a global object and a context
* after DetachGlobal has been called. * after DetachGlobal has been called.
* *
* \param global_object The global object to reattach to the * \param global_object The global object to reattach to the
* context. For this to work, the global object must be the global * context. For this to work, the global object must be the global
* object that was associated with this context before a call to * object that was associated with this context before a call to
* DetachGlobal. * DetachGlobal.
*/ */
void ReattachGlobal(Handle<Object> global_object); void ReattachGlobal(Handle<Object> global_object);
/** Creates a new context. /**
* Creates a new context and returns a handle to the newly allocated
* context.
* *
* Returns a persistent handle to the newly allocated context. This * \param isolate The isolate in which to create the context.
* persistent handle has to be disposed when the context is no
* longer used so the context can be garbage collected.
* *
* \param extensions An optional extension configuration containing * \param extensions An optional extension configuration containing
* the extensions to be installed in the newly created context. * the extensions to be installed in the newly created context.
* *
* \param global_template An optional object template from which the * \param global_template An optional object template from which the
* global object for the newly created context will be created. * global object for the newly created context will be created.
* *
* \param global_object An optional global object to be reused for * \param global_object An optional global object to be reused for
* the newly created context. This global object must have been * the newly created context. This global object must have been
* created by a previous call to Context::New with the same global * created by a previous call to Context::New with the same global
* template. The state of the global object will be completely reset * template. The state of the global object will be completely reset
* and only object identify will remain. * and only object identify will remain.
*/ */
static Local<Context> New(
Isolate* isolate,
ExtensionConfiguration* extensions = NULL,
Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(),
Handle<Value> global_object = Handle<Value>());
/** Deprecated. Use Isolate version instead. */
// TODO(mstarzinger): Put this behind the V8_DEPRECATED guard.
static Persistent<Context> New( static Persistent<Context> New(
ExtensionConfiguration* extensions = NULL, ExtensionConfiguration* extensions = NULL,
Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(),
Handle<Value> global_object = Handle<Value>()); Handle<Value> global_object = Handle<Value>());
/** Returns the last entered context. */ /** Returns the last entered context. */
static Local<Context> GetEntered(); static Local<Context> GetEntered();
/** Returns the context that is on the top of the stack. */ // TODO(svenpanne) Actually deprecate this.
/** Deprecated. Use Isolate::GetCurrentContext instead. */
static Local<Context> GetCurrent(); static Local<Context> GetCurrent();
/** /**
* Returns the context of the calling JavaScript code. That is the * Returns the context of the calling JavaScript code. That is the
* context of the top-most JavaScript frame. If there are no * context of the top-most JavaScript frame. If there are no
* JavaScript frames an empty handle is returned. * JavaScript frames an empty handle is returned.
*/ */
static Local<Context> GetCalling(); static Local<Context> GetCalling();
/** /**
skipping to change at line 4216 skipping to change at line 4294
static const int kExternalTwoByteRepresentationTag = 0x02; static const int kExternalTwoByteRepresentationTag = 0x02;
static const int kExternalAsciiRepresentationTag = 0x06; static const int kExternalAsciiRepresentationTag = 0x06;
static const int kIsolateStateOffset = 0; static const int kIsolateStateOffset = 0;
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 = 119; static const int kEmptyStringRootIndex = 118;
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 = 0xae; static const int kJSObjectType = 0xae;
skipping to change at line 4725 skipping to change at line 4803
} }
bool Value::QuickIsString() const { bool Value::QuickIsString() const {
typedef internal::Object O; typedef internal::Object O;
typedef internal::Internals I; typedef internal::Internals I;
O* obj = *reinterpret_cast<O**>(const_cast<Value*>(this)); O* obj = *reinterpret_cast<O**>(const_cast<Value*>(this));
if (!I::HasHeapObjectTag(obj)) return false; if (!I::HasHeapObjectTag(obj)) return false;
return (I::GetInstanceType(obj) < I::kFirstNonstringType); return (I::GetInstanceType(obj) < I::kFirstNonstringType);
} }
Symbol* Symbol::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS
CheckCast(value);
#endif
return static_cast<Symbol*>(value);
}
Number* Number::Cast(v8::Value* value) { Number* Number::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS #ifdef V8_ENABLE_CHECKS
CheckCast(value); CheckCast(value);
#endif #endif
return static_cast<Number*>(value); return static_cast<Number*>(value);
} }
Integer* Integer::Cast(v8::Value* value) { Integer* Integer::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS #ifdef V8_ENABLE_CHECKS
CheckCast(value); CheckCast(value);
skipping to change at line 4753 skipping to change at line 4838
return static_cast<Date*>(value); return static_cast<Date*>(value);
} }
StringObject* StringObject::Cast(v8::Value* value) { StringObject* StringObject::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS #ifdef V8_ENABLE_CHECKS
CheckCast(value); CheckCast(value);
#endif #endif
return static_cast<StringObject*>(value); return static_cast<StringObject*>(value);
} }
SymbolObject* SymbolObject::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS
CheckCast(value);
#endif
return static_cast<SymbolObject*>(value);
}
NumberObject* NumberObject::Cast(v8::Value* value) { NumberObject* NumberObject::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS #ifdef V8_ENABLE_CHECKS
CheckCast(value); CheckCast(value);
#endif #endif
return static_cast<NumberObject*>(value); return static_cast<NumberObject*>(value);
} }
BooleanObject* BooleanObject::Cast(v8::Value* value) { BooleanObject* BooleanObject::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS #ifdef V8_ENABLE_CHECKS
CheckCast(value); CheckCast(value);
 End of changes. 16 change blocks. 
11 lines changed or deleted 105 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/