aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-10 15:13:30 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-10 15:13:30 -0800
commitc5c0d1af29a152eb9504757e60ed3a2c48ea28cc (patch)
treeff3b890432b6a1e66e48410920cf4194dace7892
parent4a472ca90a98b5d1d4084c0a501d6341a8cc2907 (diff)
compress pointer type names in constant globals, if not using SAFE_HEAP
-rw-r--r--src/parseTools.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 22c2f440..18ce807e 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -779,6 +779,7 @@ function generateStructTypes(type) {
var start = index;
for (var i = 0; i < typeData.fields.length; i++) {
var type = typeData.fields[i];
+ if (!SAFE_HEAP && isPointerType(type)) type = '*'; // do not include unneeded type names without safe heap
if (Runtime.isNumberType(type) || isPointerType(type)) {
if (I64_MODE == 1 && type == 'i64') {
ret[index++] = 'i64';