aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js5
-rw-r--r--src/library_browser.js1
-rw-r--r--src/library_gc.js14
-rw-r--r--src/postamble.js4
-rw-r--r--src/settings.js5
5 files changed, 9 insertions, 20 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 1d18f292..e76407b2 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -71,10 +71,7 @@ function JSify(data, functionsOnly, givenFunctions) {
}
}
} else {
- libFuncsToInclude = ['memcpy', 'memset', 'malloc', 'free'];
- }
- if (GENERATING_HTML) {
- libFuncsToInclude.push('$Browser');
+ libFuncsToInclude = ['memcpy', 'memset', 'malloc', 'free', '$Browser'];
}
libFuncsToInclude.forEach(function(ident) {
data.functionStubs.push({
diff --git a/src/library_browser.js b/src/library_browser.js
index 7a698f8a..59d37336 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -1,7 +1,6 @@
//"use strict";
// Utilities for browser environments
-// Note: see GENERATING_HTML in settings.js
mergeInto(LibraryManager.library, {
$Browser__postset: 'Module["requestFullScreen"] = function() { Browser.requestFullScreen() };\n', // export requestFullScreen
diff --git a/src/library_gc.js b/src/library_gc.js
index ccf6656d..bf0a6aff 100644
--- a/src/library_gc.js
+++ b/src/library_gc.js
@@ -16,13 +16,15 @@ if (GC_SUPPORT) {
init: function() {
assert(!GC.initted);
GC.initted = true;
-#if GENERATING_HTML
- setInterval(function() {
- GC.maybeCollect();
- }, 1000);
-#else
- // No HTML intervals, so you need to call GC.maybeCollect() or GC.collect() manually
+ if (ENVIRONMENT_IS_WEB) {
+ setInterval(function() {
+ GC.maybeCollect();
+ }, 1000);
+ } else {
+#if ASSERTIONS
+ Module.print('No HTML intervals, so you need to call GC.maybeCollect() or GC.collect() manually');
#endif
+ }
},
malloc: function(bytes, clear, scannable) {
diff --git a/src/postamble.js b/src/postamble.js
index ea03391c..56586487 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -56,7 +56,6 @@ function run(args) {
return ret;
}
-#if GENERATING_HTML
if (Module['setStatus']) {
Module['setStatus']('Running...');
setTimeout(function() {
@@ -69,9 +68,6 @@ function run(args) {
} else {
return doRun();
}
-#else
- return doRun();
-#endif
}
Module['run'] = run;
diff --git a/src/settings.js b/src/settings.js
index abc722c3..2526081b 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -205,11 +205,6 @@ var LINKABLE = 0; // If set to 1, this file can be linked with others, either as
// LINKABLE of 0 is very useful in that we can reduce the size of the
// generated code very significantly, by removing everything not actually used.
-var GENERATING_HTML = 0; // Set to 1 when generating .html and not just .js. This is automatically
- // set to 1 by emcc when it is told to generate a .html file. Note that if
- // you generate a .js file and want browser-specific functionality, you
- // need to set this to 1 yourself.
-
var RUNTIME_TYPE_INFO = 0; // Whether to expose type info to the script at run time. This
// increases the size of the generated script, but allows you
// to more easily perform operations from handwritten JS on