aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/include/emscripten/emscripten.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h
index 430fbc1c..d30620ec 100644
--- a/system/include/emscripten/emscripten.h
+++ b/system/include/emscripten/emscripten.h
@@ -23,10 +23,13 @@ extern "C" {
*
* EM_ASM(window.alert('hai'));
*
+ * This also works with asm.js, as it outlines the code (it
+ * does a function call to reach it).
+ *
* Note: double-quotes (") are not supported, but you can use
* single-quotes (') in js anyhow.
*/
-#define EM_ASM(...) asm(#__VA_ARGS__)
+#define EM_ASM(...) emscripten_asm_const(#__VA_ARGS__)
/*
* Forces LLVM to not dead-code-eliminate a function. Note that
@@ -376,6 +379,8 @@ int emscripten_get_worker_queue_size(worker_handle worker);
#define EMSCRIPTEN_NETWORK_WEBRTC 1
void emscripten_set_network_backend(int backend);
+/* Internal APIs. Be careful with these. */
+
/*
* Profiling tools.
* INIT must be called first, with the maximum identifier that
@@ -413,6 +418,9 @@ void emscripten_jcache_printf(const char *format, ...);
void emscripten_jcache_printf_(...); /* internal use */
#endif
+/* Helper API for EM_ASM - do not call this yourself */
+void emscripten_asm_const(const char *code);
+
#ifdef __cplusplus
}
#endif