|
|
@ -20,8 +20,12 @@ class InternalCallTree { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
buildTree (trace) { |
|
|
|
buildTree (trace) { |
|
|
|
|
|
|
|
if (!this.solidityProxy.loaded()) { |
|
|
|
|
|
|
|
console.log('compilation result not loaded. Cannot build internal call tree') |
|
|
|
|
|
|
|
} else { |
|
|
|
buildTree(this, 0, '', trace) |
|
|
|
buildTree(this, 0, '', trace) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
reset () { |
|
|
|
reset () { |
|
|
|
this.scopes = {} |
|
|
|
this.scopes = {} |
|
|
@ -31,7 +35,11 @@ class InternalCallTree { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
findScope (vmtraceIndex) { |
|
|
|
findScope (vmtraceIndex) { |
|
|
|
var scopeId = util.findLowerBoundValue(vmtraceIndex, Object.keys(this.scopeStarts)) |
|
|
|
var scopes = Object.keys(this.scopeStarts) |
|
|
|
|
|
|
|
if (!scopes.length) { |
|
|
|
|
|
|
|
return null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var scopeId = util.findLowerBoundValue(vmtraceIndex, scopes) |
|
|
|
scopeId = this.scopeStarts[scopeId] |
|
|
|
scopeId = this.scopeStarts[scopeId] |
|
|
|
var scope = this.scopes[scopeId] |
|
|
|
var scope = this.scopes[scopeId] |
|
|
|
var reg = /(.\d|\d)$/ |
|
|
|
var reg = /(.\d|\d)$/ |
|
|
|