all tests fixed

yann300-patch-5
aniket-engg 4 years ago committed by Aniket
parent 155611c785
commit 8ac5671145
  1. 1
      libs/remix-debug/src/solidity-decoder/internalCallTree.js
  2. 9
      libs/remix-debug/src/source/astWalker.js
  3. 1
      libs/remix-debug/test/decoder/localsTests/int.js

@ -335,7 +335,6 @@ function extractFunctionDefinitions (ast, astWalker) {
function addParams (parameterList, tree, scopeId, states, contractName, sourceLocation, stackLength, stackPosition, dir) {
let params = []
for (let inputParam in parameterList.parameters) {
console.log('parameterList.parameters------>', parameterList.parameters)
const param = parameterList.parameters[inputParam]
const stackDepth = stackLength + (dir * stackPosition)
if (stackDepth >= 0) {

@ -21,9 +21,12 @@ AstWalker.prototype.walk = function (ast, callback) {
if (!('*' in callback)) {
callback['*'] = function () { return true }
}
if (manageCallBack(ast, callback) && ast.nodes && ast.nodes.length > 0) {
for (let k in ast.nodes) {
const child = ast.nodes[k]
const nodes = ast.nodes || (ast.body && ast.body.statements) || ast.declarations
if(ast.body && ast.initializationExpression) // 'for' loop handling
nodes.push(ast.initializationExpression)
if (manageCallBack(ast, callback) && nodes && nodes.length > 0) {
for (let k in nodes) {
const child = nodes[k]
this.walk(child, callback)
}
}

@ -65,7 +65,6 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu
st.equals(scopeStarts[136], '3')
st.equals(scopeStarts[153], '4')
st.equals(scopeStarts[166], '4.1')
console.log('----------->', scopes[''])
st.equals(scopes[''].locals['ui8'].type.typeName, 'uint8')
st.equals(scopes[''].locals['ui16'].type.typeName, 'uint16')
st.equals(scopes[''].locals['ui32'].type.typeName, 'uint32')

Loading…
Cancel
Save