Commit ef848d44 authored by yann300's avatar yann300

renaming

parent 3ea4abeb
......@@ -170,7 +170,7 @@ function getStructMembers (typeName, stateDefinitions) {
var offsets = computeOffsets(dec.children, stateDefinitions)
return {
members: offsets.typesOffsets,
storageBytes: offsets.endLocation.slot
storageSlots: offsets.endLocation.slot
}
}
}
......@@ -238,14 +238,14 @@ function computeOffsets (types, stateItems, cb) {
for (var i in types) {
var variable = types[i]
var type = parseType(variable.attributes.type, stateItems)
if (location.offset + type.storageBytes > 32) {
location.slot++
location.offset = 0
}
if (!type) {
console.log('unable to retrieve decode info of ' + variable.attributes.type)
return null
}
if (location.offset + type.storageBytes > 32) {
location.slot++
location.offset = 0
}
ret.push({
name: variable.attributes.name,
type: type,
......
'use strict'
function Struct (memberDetails) {
this.storageSlots = memberDetails.storageBytes
this.storageSlots = memberDetails.storageSlots
this.storageBytes = 32
this.members = memberDetails.members
this.typeName = 'struct'
......
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