Commit 922fe987 authored by yann300's avatar yann300

store only array of step

parent d35ba6eb
......@@ -87,17 +87,17 @@ async function buildTree (tree, step, scopeId) {
let subScope = 1
tree.scopeStarts[step] = scopeId
tree.scopes[scopeId] = { firstStep: step, locals: {} }
var currentSourceLocation = {}
while (step < tree.traceManager.trace.length) {
var sourceLocation
try {
sourceLocation = await extractSourceLocation(tree, step)
var previous = this.reducedTraceBySourceLocation[this.reducedTraceBySourceLocation.length - 1]
if (previous &&
(sourceLocation.jump !== previous.jump ||
sourceLocation.start !== previous.start ||
sourceLocation.length !== previous.length ||
sourceLocation.file !== previous.file)) {
this.reducedTraceBySourceLocation.push(step)
if (sourceLocation.jump !== currentSourceLocation.jump ||
sourceLocation.start !== currentSourceLocation.start ||
sourceLocation.length !== currentSourceLocation.length ||
sourceLocation.file !== currentSourceLocation.file) {
tree.reducedTraceBySourceLocation.push(step)
currentSourceLocation = sourceLocation
}
} catch (e) {
return { outStep: step, error: 'InternalCallTree - Error resolving source location. ' + step + ' ' + e.message }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment