aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-10-29 17:17:52 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-10-29 17:17:52 -0700
commit4af62232d03bd71db0f1ec907ff2a52ecef2f5d9 (patch)
tree7518f38211be1f5f195b43aa09d3ddbaa01dd28f /src/parseTools.js
parent7be5a908230091693fc68514ccef7dfb6bb65896 (diff)
handle vector types in calcAllocatedSize
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index dae386f1..223adbbf 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1009,11 +1009,9 @@ function getOldLabel(label) {
}
function calcAllocatedSize(type) {
- if (pointingLevels(type) == 0 && isStructType(type)) {
- return Types.types[type].flatSize; // makeEmptyStruct(item.allocatedType).length;
- } else {
- return Runtime.getNativeTypeSize(type); // We can really get away with '1', though, at least on the stack...
- }
+ var ret = Runtime.getNativeTypeSize(type);
+ if (ret) return ret;
+ return Types.types[type].flatSize; // known type
}
// Generates the type signature for a structure, for each byte, the type that is there.