diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-18 13:30:49 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-18 13:30:49 -0700 |
commit | b89290b3456bd125b468391537487cbd2fd6f32e (patch) | |
tree | 7c4d6b98462fc6e880b98533ab2d52a9c91c617d /src/runtime.js | |
parent | 5c4bbda63c06e107c725d0edb90fafc169887eae (diff) |
support for vector types nested in others
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime.js b/src/runtime.js index e36068c8..6839f556 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -225,7 +225,8 @@ var Runtime = { size = field.substr(1)|0; alignSize = 1; } else { - throw 'Unclear type in struct: ' + field + ', in ' + type.name_ + ' :: ' + dump(Types.types[type.name_]); + assert(field[0] === '<', field); // assumed to be a vector type, if none of the above + size = alignSize = Types.types[field].flatSize; // fully aligned } if (type.packed) alignSize = 1; type.alignSize = Math.max(type.alignSize, alignSize); |