v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 748 | skipping to change at line 748 | |||
* Flags that determine what information is placed captured for each | * Flags that determine what information is placed captured for each | |||
* StackFrame when grabbing the current stack trace. | * StackFrame when grabbing the current stack trace. | |||
*/ | */ | |||
enum StackTraceOptions { | enum StackTraceOptions { | |||
kLineNumber = 1, | kLineNumber = 1, | |||
kColumnOffset = 1 << 1 | kLineNumber, | kColumnOffset = 1 << 1 | kLineNumber, | |||
kScriptName = 1 << 2, | kScriptName = 1 << 2, | |||
kFunctionName = 1 << 3, | kFunctionName = 1 << 3, | |||
kIsEval = 1 << 4, | kIsEval = 1 << 4, | |||
kIsConstructor = 1 << 5, | kIsConstructor = 1 << 5, | |||
kScriptNameOrSourceURL = 1 << 6, | ||||
kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName, | kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName, | |||
kDetailed = kOverview | kIsEval | kIsConstructor | kDetailed = kOverview | kIsEval | kIsConstructor | kScriptNameOrSourceU RL | |||
}; | }; | |||
/** | /** | |||
* Returns a StackFrame at a particular index. | * Returns a StackFrame at a particular index. | |||
*/ | */ | |||
Local<StackFrame> GetFrame(uint32_t index) const; | Local<StackFrame> GetFrame(uint32_t index) const; | |||
/** | /** | |||
* Returns the number of StackFrames. | * Returns the number of StackFrames. | |||
*/ | */ | |||
skipping to change at line 808 | skipping to change at line 809 | |||
*/ | */ | |||
int GetColumn() const; | int GetColumn() const; | |||
/** | /** | |||
* Returns the name of the resource that contains the script for the | * Returns the name of the resource that contains the script for the | |||
* function for this StackFrame. | * function for this StackFrame. | |||
*/ | */ | |||
Local<String> GetScriptName() const; | Local<String> GetScriptName() const; | |||
/** | /** | |||
* Returns the name of the resource that contains the script for the | ||||
* function for this StackFrame or sourceURL value if the script name | ||||
* is undefined and its source ends with //@ sourceURL=... string. | ||||
*/ | ||||
Local<String> GetScriptNameOrSourceURL() const; | ||||
/** | ||||
* Returns the name of the function associated with this stack frame. | * Returns the name of the function associated with this stack frame. | |||
*/ | */ | |||
Local<String> GetFunctionName() const; | Local<String> GetFunctionName() const; | |||
/** | /** | |||
* Returns whether or not the associated function is compiled via a call to | * Returns whether or not the associated function is compiled via a call to | |||
* eval(). | * eval(). | |||
*/ | */ | |||
bool IsEval() const; | bool IsEval() const; | |||
skipping to change at line 1337 | skipping to change at line 1345 | |||
* 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. | |||
*/ | */ | |||
V8EXPORT double NumberValue() const; | V8EXPORT double NumberValue() const; | |||
static inline Date* Cast(v8::Value* obj); | static inline Date* Cast(v8::Value* obj); | |||
private: | private: | |||
V8EXPORT static void CheckCast(v8::Value* obj); | V8EXPORT static void CheckCast(v8::Value* obj); | |||
}; | }; | |||
/** | ||||
* An instance of the built-in RegExp constructor (ECMA-262, 15.10). | ||||
*/ | ||||
class RegExp : public Value { | ||||
public: | ||||
/** | ||||
* Regular expression flag bits. They can be or'ed to enable a set | ||||
* of flags. | ||||
*/ | ||||
enum Flags { | ||||
kNone = 0, | ||||
kGlobal = 1, | ||||
kIgnoreCase = 2, | ||||
kMultiline = 4 | ||||
}; | ||||
/** | ||||
* Creates a regular expression from the given pattern string and | ||||
* the flags bit field. May throw a JavaScript exception as | ||||
* described in ECMA-262, 15.10.4.1. | ||||
* | ||||
* For example, | ||||
* RegExp::New(v8::String::New("foo"), | ||||
* static_cast<RegExp::Flags>(kGlobal | kMultiline)) | ||||
* is equivalent to evaluating "/foo/gm". | ||||
*/ | ||||
V8EXPORT static Local<RegExp> New(Handle<String> pattern, | ||||
Flags flags); | ||||
/** | ||||
* Returns the value of the source property: a string representing | ||||
* the regular expression. | ||||
*/ | ||||
V8EXPORT Local<String> GetSource() const; | ||||
/** | ||||
* Returns the flags bit field. | ||||
*/ | ||||
V8EXPORT Flags GetFlags() const; | ||||
static inline RegExp* Cast(v8::Value* obj); | ||||
private: | ||||
V8EXPORT static void CheckCast(v8::Value* obj); | ||||
}; | ||||
enum PropertyAttribute { | enum PropertyAttribute { | |||
None = 0, | None = 0, | |||
ReadOnly = 1 << 0, | ReadOnly = 1 << 0, | |||
DontEnum = 1 << 1, | DontEnum = 1 << 1, | |||
DontDelete = 1 << 2 | DontDelete = 1 << 2 | |||
}; | }; | |||
enum ExternalArrayType { | enum ExternalArrayType { | |||
kExternalByteArray = 1, | kExternalByteArray = 1, | |||
kExternalUnsignedByteArray, | kExternalUnsignedByteArray, | |||
skipping to change at line 3511 | skipping to change at line 3565 | |||
return static_cast<Integer*>(value); | return static_cast<Integer*>(value); | |||
} | } | |||
Date* Date::Cast(v8::Value* value) { | Date* Date::Cast(v8::Value* value) { | |||
#ifdef V8_ENABLE_CHECKS | #ifdef V8_ENABLE_CHECKS | |||
CheckCast(value); | CheckCast(value); | |||
#endif | #endif | |||
return static_cast<Date*>(value); | return static_cast<Date*>(value); | |||
} | } | |||
RegExp* RegExp::Cast(v8::Value* value) { | ||||
#ifdef V8_ENABLE_CHECKS | ||||
CheckCast(value); | ||||
#endif | ||||
return static_cast<RegExp*>(value); | ||||
} | ||||
Object* Object::Cast(v8::Value* value) { | Object* Object::Cast(v8::Value* value) { | |||
#ifdef V8_ENABLE_CHECKS | #ifdef V8_ENABLE_CHECKS | |||
CheckCast(value); | CheckCast(value); | |||
#endif | #endif | |||
return static_cast<Object*>(value); | return static_cast<Object*>(value); | |||
} | } | |||
Array* Array::Cast(v8::Value* value) { | Array* Array::Cast(v8::Value* value) { | |||
#ifdef V8_ENABLE_CHECKS | #ifdef V8_ENABLE_CHECKS | |||
CheckCast(value); | CheckCast(value); | |||
End of changes. 5 change blocks. | ||||
1 lines changed or deleted | 62 lines changed or added | |||