aboutsummaryrefslogtreecommitdiff
path: root/src/analyzer.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyzer.js')
-rw-r--r--src/analyzer.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index 4a692826..d1039e1c 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -197,7 +197,9 @@ function analyzer(data) {
} else if (dedup(diffs).length == 1) {
type.flatFactor = diffs[0];
}
- type.flatSize = Runtime.alignMemory(type.flatSize); // final padding at end
+ if (type.flatSize > QUANTUM_SIZE) {
+ type.flatSize = Runtime.alignMemory(type.flatSize); // final padding at end
+ }
type.needsFlattening = (this.flatFactor != 1);
dprint('types', 'type: ' + type.name_ + ' : ' + JSON.stringify(type.fields));
dprint('types', ' has final size of ' + type.flatSize + ', flatting: ' + type.needsFlattening + ' ? ' + (type.flatFactor ? type.flatFactor : JSON.stringify(type.flatIndexes)));