summaryrefslogtreecommitdiff
path: root/deps/v8/include
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-10-18 17:13:30 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-10-18 17:13:30 -0700
commit1b2f6f9e29bf7137e177b8d9b600fe558d36f512 (patch)
treec67553632967b08349b9b5e83a897d189dafd8f2 /deps/v8/include
parent5d400cfd3a2a9faf27a88bf82f33a57f78fa65af (diff)
downloadnode-new-1b2f6f9e29bf7137e177b8d9b600fe558d36f512.tar.gz
Upgrade V8 to 2.5.0
Diffstat (limited to 'deps/v8/include')
-rw-r--r--deps/v8/include/v8-profiler.h4
-rw-r--r--deps/v8/include/v8.h65
2 files changed, 67 insertions, 2 deletions
diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h
index 27da41822b..fb492d955c 100644
--- a/deps/v8/include/v8-profiler.h
+++ b/deps/v8/include/v8-profiler.h
@@ -245,7 +245,9 @@ class V8EXPORT HeapGraphNode {
kString = 2, // A string.
kObject = 3, // A JS object (except for arrays and strings).
kCode = 4, // Compiled code.
- kClosure = 5 // Function closure.
+ kClosure = 5, // Function closure.
+ kRegExp = 6, // RegExp.
+ kHeapNumber = 7 // Number stored in the heap.
};
/** Returns node type (see HeapGraphNode::Type). */
diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h
index 0613d5861c..ef9a41168c 100644
--- a/deps/v8/include/v8.h
+++ b/deps/v8/include/v8.h
@@ -758,8 +758,9 @@ class V8EXPORT StackTrace {
kFunctionName = 1 << 3,
kIsEval = 1 << 4,
kIsConstructor = 1 << 5,
+ kScriptNameOrSourceURL = 1 << 6,
kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName,
- kDetailed = kOverview | kIsEval | kIsConstructor
+ kDetailed = kOverview | kIsEval | kIsConstructor | kScriptNameOrSourceURL
};
/**
@@ -819,6 +820,13 @@ class V8EXPORT StackFrame {
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.
*/
Local<String> GetFunctionName() const;
@@ -1359,6 +1367,53 @@ class Date : public Value {
};
+/**
+ * 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 {
None = 0,
ReadOnly = 1 << 0,
@@ -3617,6 +3672,14 @@ Date* Date::Cast(v8::Value* 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) {
#ifdef V8_ENABLE_CHECKS
CheckCast(value);