aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-11-28 16:28:40 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-11-28 16:28:40 -0800
commitd8560636869ccc14703b781da33764131dd21fa6 (patch)
tree4a9502efab5b5d1f4895eb811cb78a5e711b3f1e /src/parseTools.js
parent30f27aa86bdfdc92645f949ace36eefd6053b6cb (diff)
fix for test_closure_compiler with spidermonkey as compiler engine
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 3b4e8df4..322f87a9 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -738,14 +738,14 @@ function getLabelIds(labels) {
function getNativeTypeSize(type) {
if (QUANTUM_SIZE == 1) return 1;
var size = {
- '_i1': 1,
- '_i8': 1,
- '_i16': 2,
- '_i32': 4,
- '_i64': 8,
- "_float": 4,
- "_double": 8
- }['_'+type]; // add '_' since float&double confuse Closure compiler as keys.
+ '%i1': 1,
+ '%i8': 1,
+ '%i16': 2,
+ '%i32': 4,
+ '%i64': 8,
+ "%float": 4,
+ "%double": 8
+ }['%'+type]; // add '%' since float and double confuse Closure compiler as keys, and also spidermonkey as a compiler will remove 's from '_i8' etc
if (!size && type[type.length-1] == '*') {
size = QUANTUM_SIZE; // A pointer
}