|
|
@ -116,14 +116,21 @@ async function buildTree (tree, step, scopeId) { |
|
|
|
return false |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var currentSourceLocation = {} |
|
|
|
function includedSource (source, included) { |
|
|
|
|
|
|
|
return (included.start !== -1 && |
|
|
|
|
|
|
|
included.length !== -1 && |
|
|
|
|
|
|
|
included.file !== -1 && |
|
|
|
|
|
|
|
included.start >= source.start && |
|
|
|
|
|
|
|
included.start + included.length <= source.start + source.length && |
|
|
|
|
|
|
|
included.file === source.file) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var currentSourceLocation = {start: -1, length: -1, file: -1} |
|
|
|
while (step < tree.traceManager.trace.length) { |
|
|
|
while (step < tree.traceManager.trace.length) { |
|
|
|
var sourceLocation |
|
|
|
var sourceLocation |
|
|
|
try { |
|
|
|
try { |
|
|
|
sourceLocation = await tree.extractSourceLocation(step) |
|
|
|
sourceLocation = await tree.extractSourceLocation(step) |
|
|
|
if (sourceLocation.start !== currentSourceLocation.start || |
|
|
|
if (!includedSource(sourceLocation, currentSourceLocation)) { |
|
|
|
sourceLocation.length !== currentSourceLocation.length || |
|
|
|
|
|
|
|
sourceLocation.file !== currentSourceLocation.file) { |
|
|
|
|
|
|
|
tree.reducedTrace.push(step) |
|
|
|
tree.reducedTrace.push(step) |
|
|
|
currentSourceLocation = sourceLocation |
|
|
|
currentSourceLocation = sourceLocation |
|
|
|
} |
|
|
|
} |
|
|
|