Commit e6798dea authored by chriseth's avatar chriseth Committed by GitHub

Merge pull request #190 from ethereum/anonymouslocals

set <n> for the name if anonymous
parents 382b2b72 d9670e9f
......@@ -8,10 +8,16 @@ function solidityLocals (vmtraceIndex, internalTreeCall, stack, memory, storage)
}
var locals = {}
memory = formatMemory(memory)
var anonymousIncr = 1
for (var local in scope.locals) {
let variable = scope.locals[local]
if (variable.stackDepth < stack.length) {
locals[variable.name] = variable.type.decodeFromStack(variable.stackDepth, stack, memory, storage)
var name = variable.name
if (name === '') {
name = '<' + anonymousIncr + '>'
anonymousIncr++
}
locals[name] = variable.type.decodeFromStack(variable.stackDepth, stack, memory, storage)
}
}
return locals
......
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