Update to V8 with partial snapshots. This is taken from the partial_snapshot branch of V8.
diff --git a/src/messages.js b/src/messages.js
index df008c9..7c939ca 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -27,6 +27,16 @@
// -------------------------------------------------------------------
+//
+// Matches Script::Type from objects.h
+var TYPE_NATIVE = 0;
+var TYPE_EXTENSION = 1;
+var TYPE_NORMAL = 2;
+
+// Matches Script::CompilationType from objects.h
+var COMPILATION_TYPE_HOST = 0;
+var COMPILATION_TYPE_EVAL = 1;
+var COMPILATION_TYPE_JSON = 2;
// Lazily initialized.
var kVowelSounds = 0;
@@ -162,6 +172,8 @@
value_and_accessor: "Invalid property. A property cannot both have accessors and be writable or have a value: %0",
proto_object_or_null: "Object prototype may only be an Object or null",
property_desc_object: "Property description must be an object: %0",
+ redefine_disallowed: "Cannot redefine property: %0",
+ define_disallowed: "Cannot define property, object is not extensible: %0",
// RangeError
invalid_array_length: "Invalid array length",
stack_overflow: "Maximum call stack size exceeded",
@@ -630,7 +642,7 @@
CallSite.prototype.isEval = function () {
var script = %FunctionGetScript(this.fun);
- return script && script.compilation_type == 1;
+ return script && script.compilation_type == COMPILATION_TYPE_EVAL;
};
CallSite.prototype.getEvalOrigin = function () {
@@ -652,7 +664,7 @@
}
// Maybe this is an evaluation?
var script = %FunctionGetScript(this.fun);
- if (script && script.compilation_type == 1)
+ if (script && script.compilation_type == COMPILATION_TYPE_EVAL)
return "eval";
return null;
};
@@ -708,7 +720,7 @@
CallSite.prototype.isNative = function () {
var script = %FunctionGetScript(this.fun);
- return script ? (script.type == 0) : false;
+ return script ? (script.type == TYPE_NATIVE) : false;
};
CallSite.prototype.getPosition = function () {
@@ -732,7 +744,7 @@
var eval_from_script = script.eval_from_script;
if (eval_from_script) {
- if (eval_from_script.compilation_type == 1) {
+ if (eval_from_script.compilation_type == COMPILATION_TYPE_EVAL) {
// eval script originated from another eval.
eval_origin += " (eval at " + FormatEvalOrigin(eval_from_script) + ")";
} else {