diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-27 11:32:18 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-27 11:32:18 -0800 |
commit | ed7d230d8d8dc2c25a3dd28080d971deaa061d6d (patch) | |
tree | c159c52ef936f0bb6013bbecf135ebdd78aa0539 | |
parent | acf077c620074ee40727cfea7137e647454bd392 (diff) |
correct indexed globals in structured constants
-rw-r--r-- | src/jsifier.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index aaf2d7d9..816290f8 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -217,7 +217,7 @@ function JSify(data, functionsOnly, givenFunctions) { throw 'Invalid segment: ' + dump(segment); } assert(segment.type, 'Missing type for constant segment!'); - return indexizeFunctions(ret, segment.type); + return makeGlobalUse(indexizeFunctions(ret, segment.type)); }; return tokens.map(handleSegment) } @@ -226,7 +226,7 @@ function JSify(data, functionsOnly, givenFunctions) { if (value.intertype in PARSABLE_LLVM_FUNCTIONS) { return [finalizeLLVMFunctionCall(value)]; } else if (Runtime.isNumberType(type) || pointingLevels(type) >= 1) { - return indexizeFunctions(parseNumerical(value.value), type); + return makeGlobalUse(indexizeFunctions(parseNumerical(value.value), type)); } else if (value.intertype === 'emptystruct') { return makeEmptyStruct(type); } else if (value.intertype === 'string') { |