Skip to content
Snippets Groups Projects
Commit 2434340f authored by Steve Fink's avatar Steve Fink
Browse files

Bug 1400468 - Trim output, r=jonco

--HG--
extra : rebase_source : de700225cbfcfc4a3fad56327d9007eabff02859
parent a4306ab9
No related branches found
No related tags found
No related merge requests found
......@@ -684,6 +684,12 @@ CallSite.prototype.safeString = function()
var errorCount = 0;
var errorLimit = 100;
// We want to suppress output for functions that ended up not having any
// hazards, for brevity of the final output. So each new toplevel function will
// initialize this to a string, which should be printed only if an error is
// seen.
var errorHeader;
var startTime = new Date;
function elapsedTime()
{
......@@ -753,7 +759,7 @@ for (var bodyIndex = minStream; bodyIndex <= maxStream; bodyIndex++) {
print(elapsedTime() + "Found " + roots.length + " roots.");
for (var i = 0; i < roots.length; i++) {
var root = roots[i];
print(elapsedTime() + "#" + (i + 1) + " Analyzing " + root + " ...");
errorHeader = elapsedTime() + "#" + (i + 1) + " Analyzing " + root + " ...";
try {
processRoot(root);
} catch (e) {
......@@ -776,6 +782,11 @@ var reachableLoops;
function dumpError(entry, location, text)
{
if (errorHeader) {
print(errorHeader);
errorHeader = undefined;
}
var stack = entry.stack;
print("Error: " + text);
print("Location: " + entry.name + (location ? " @ " + location : "") + stack[0].safeString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment