aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-07-02 17:14:42 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-03 15:31:05 -0700
commit729e1fe7bec554f383c2b163dc786c5b8a5ed1f0 (patch)
treef3c27f1419db7bde0fa948e100ada33e9132cd57 /src
parent5beb8daae49c7ef9232a658c3158ebe0d565489c (diff)
emit F_BASE
Diffstat (limited to 'src')
-rw-r--r--src/modules.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules.js b/src/modules.js
index cf5be093..a6aa2644 100644
--- a/src/modules.js
+++ b/src/modules.js
@@ -259,7 +259,7 @@ var Functions = {
},
// Mark a function as needing indexing. Python will coordinate them all
- getIndex: function(ident, doNotCreate) {
+ getIndex: function(ident, doNotCreate, sig) {
if (doNotCreate && !(ident in this.indexedFunctions)) {
if (!Functions.getIndex.tentative) Functions.getIndex.tentative = {}; // only used by GL emulation; TODO: generalize when needed
Functions.getIndex.tentative[ident] = 0;
@@ -279,7 +279,9 @@ var Functions = {
}
ret = ret.toString();
}
- if (BUILD_AS_SHARED_LIB) {
+ if (SIDE_MODULE && sig) { // sig can be undefined for the GL library functions
+ ret = '((F_BASE_' + sig + ' + ' + ret + ')|0)';
+ } else if (BUILD_AS_SHARED_LIB) {
ret = '(FUNCTION_TABLE_OFFSET + ' + ret + ')';
}
return ret;