aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-24 14:33:34 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-24 14:33:34 -0800
commita75d43ec8dfc66a461dbe736692e70352d7dc556 (patch)
tree78004f2935a323dc46bb2db83d72c4458e63ed7f /system
parentd47a30c26ab0f76c74cb53d9eb54cb049ea05d21 (diff)
parentcd3e0b2ceef728c27745d1e7f5d6b95671bcaf04 (diff)
Merge branch 'fastcomp-by-default' into incoming
Diffstat (limited to 'system')
-rw-r--r--system/include/emscripten/emscripten.h14
-rw-r--r--system/include/gc.h2
2 files changed, 12 insertions, 4 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h
index b92d920c..852a8e0d 100644
--- a/system/include/emscripten/emscripten.h
+++ b/system/include/emscripten/emscripten.h
@@ -40,10 +40,15 @@ extern "C" {
#define EM_ASM(...) emscripten_asm_const(#__VA_ARGS__)
/*
- * Input-output versions of EM_ASM. EM_ASM_INT receives arguments of
- * either int or double type and returns an int; EM_ASM_DOUBLE
- * receives similar arguments (int or double) but returns a double.
- * Arguments arrive as $0, $1 etc; output value should be returned:
+ * Input-output versions of EM_ASM.
+ *
+ * EM_ASM_ (an extra _ is added) allows sending values (ints
+ * or doubles) into the code. If you also want a return value,
+ * EM_ASM_INT receives arguments (of int or double type)
+ * and returns an int; EM_ASM_DOUBLE does the same and returns
+ * a double.
+ *
+ * Arguments arrive as $0, $1 etc. The output value should be returned:
*
* int x = EM_ASM_INT({
* console.log('I received: ' + [$0, $1]);
@@ -54,6 +59,7 @@ extern "C" {
* (int or double) but *not* to pass any values, you can use
* EM_ASM_INT_V and EM_ASM_DOUBLE_V respectively.
*/
+#define EM_ASM_(code, ...) emscripten_asm_const_int(#code, __VA_ARGS__)
#define EM_ASM_INT(code, ...) emscripten_asm_const_int(#code, __VA_ARGS__)
#define EM_ASM_DOUBLE(code, ...) emscripten_asm_const_double(#code, __VA_ARGS__)
#define EM_ASM_INT_V(code) emscripten_asm_const_int(#code)
diff --git a/system/include/gc.h b/system/include/gc.h
index a21fd410..affa615f 100644
--- a/system/include/gc.h
+++ b/system/include/gc.h
@@ -1,5 +1,7 @@
/*
* Boehm-compatible GC API
+ *
+ * WARNING: this is deprecated. You should just build Boehm from source, it is much faster than the toy version written in emscripten
*/
#ifndef _GC_H_INCLUDED
#define _GC_H_INCLUDED