Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: src/messages.js

Issue 1094014: Merge the partial_snapshots branch back into bleeding_edge. For... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/messages.js
===================================================================
--- src/messages.js (revision 4215)
+++ src/messages.js (working copy)
@@ -27,7 +27,17 @@
// -------------------------------------------------------------------
+//
+// 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;
var kCapitalVowelSounds = 0;
@@ -634,7 +644,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 () {
@@ -656,7 +666,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;
};
@@ -712,7 +722,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 () {
@@ -736,7 +746,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 {

Powered by Google App Engine
This is Rietveld 408576698