aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--src/jsifier.js2
-rw-r--r--src/library.js3
-rw-r--r--src/settings.js2
-rw-r--r--system/lib/dlmalloc.c1
5 files changed, 7 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index c78ee543..a46d90d9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -26,7 +26,7 @@ a license to everyone to use it as detailed in LICENSE.)
* Jon Bardin <diclophis@gmail.com>
* Jukka Jylänki <jujjyl@gmail.com>
* Aleksander Guryanov <caiiiycuk@gmail.com>
-* Chad Austin <chad@chadaustin.me>
+* Chad Austin <chad@chadaustin.me> (copyright owned by IMVU)
* nandhp <nandhp@gmail.com>
* YeZhongWen <linghuye2.0@gmail.com>
* Xingxing Pan <forandom@gmail.com>
diff --git a/src/jsifier.js b/src/jsifier.js
index 01ecd7d3..92b39b7d 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -32,7 +32,7 @@ function JSify(data, functionsOnly, givenFunctions) {
// else. This lets us not hold any strings in memory, we simply print
// things out as they are ready.
- var shellFile = BUILD_AS_SHARED_LIB ? 'shell_sharedlib.js' : 'shell.js';
+ var shellFile = SHELL_FILE ? SHELL_FILE : (BUILD_AS_SHARED_LIB ? 'shell_sharedlib.js' : 'shell.js');
var shellParts = read(shellFile).split('{{BODY}}');
print(shellParts[0]);
var preFile = BUILD_AS_SHARED_LIB ? 'preamble_sharedlib.js' : 'preamble.js';
diff --git a/src/library.js b/src/library.js
index 1c150bc9..3531db97 100644
--- a/src/library.js
+++ b/src/library.js
@@ -4850,6 +4850,7 @@ LibraryManager.library = {
// RTTI hacks for exception handling, defining type_infos for common types.
// The values are dummies. We simply use the addresses of these statically
// allocated variables as unique identifiers.
+ _ZTIb: [0], // bool
_ZTIi: [0], // int
_ZTIj: [0], // unsigned int
_ZTIl: [0], // long
@@ -4863,7 +4864,7 @@ LibraryManager.library = {
_ZTIa: [0], // signed char
_ZTIh: [0], // unsigned char
_ZTIs: [0], // short
- _ZTIt: [0], // signed short
+ _ZTIt: [0], // unsigned short
_ZTIv: [0], // void
_ZTIPv: [0], // void*
diff --git a/src/settings.js b/src/settings.js
index 76dc25a1..16cc3930 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -198,6 +198,8 @@ var INCLUDE_FULL_LIBRARY = 0; // Whether to include the whole library rather tha
// dynamically loading modules that make use of runtime
// library functions that are not used in the main module.
+var SHELL_FILE = null; // set this to a string to override the shell file used
+
var SHOW_LABELS = 0; // Show labels in the generated code
var BUILD_AS_SHARED_LIB = 0; // Whether to build the code as a shared library, which
diff --git a/system/lib/dlmalloc.c b/system/lib/dlmalloc.c
index 6185b1c7..9ee3709e 100644
--- a/system/lib/dlmalloc.c
+++ b/system/lib/dlmalloc.c
@@ -4141,6 +4141,7 @@ static int sys_trim(mstate m, size_t pad) {
sp->size >= extra &&
!has_segment_link(m, sp)) { /* can't shrink if pinned */
size_t newsize = sp->size - extra;
+ (void)newsize; // XXX EMSCRIPTEN
/* Prefer mremap, fall back to munmap */
if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != MFAIL) ||
(CALL_MUNMAP(sp->base + newsize, extra) == 0)) {