View gist:0efd8e746303ce7773195f81859d661b
// beginning a Binaryen API trace
#include <math.h>
#include <map>
#include "src/binaryen-c.h"
int main() {
std::map<size_t, BinaryenFunctionTypeRef> functionTypes;
std::map<size_t, BinaryenExpressionRef> expressions;
std::map<size_t, BinaryenFunctionRef> functions;
std::map<size_t, RelooperBlockRef> relooperBlocks;
BinaryenModuleRef the_module = NULL;
View gist:6d1f698cda3d3788681ac8563c5f6165
[wasm-validator error in function $real_main] 1 != 0: function body type must match, if function returns, on
[none] [none] (block
[unreachable] (block $block$1$break
[none] (set_local $6
[i32] (i32.load
[i32] (i32.const 0)
)
)
[unreachable] [unreachable] (block
[unreachable] (br $block$1$break)
View gist:db6764473448099c128f7a9e1e664292
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
--> src/trans.rs:76:21
|
76 | let ref mut v = BinaryenModuleCtxt {
| ^^^^^^^^^^^^^^^^^^
|
help: consider using an explicit lifetime parameter as shown: fn trans_crate<'a>(tcx: &TyCtxt<'a, 'a, 'a>, entry_fn: Option<NodeId>,
options: &WasmTransOptions) -> Result<()>
--> src/trans.rs:65:1
|
View gist:a9cf2a5cc4340ed5dde991792f3ee4b1
(module
(type $rustfn-0-2 (func (param i32) (result i32)))
(type $rustfn-0-4 (func))
(type $rustfn-0-5 (func))
(type $__wasm_start (func))
(type $rustfn-0-19 (func (param i32 i32) (result i32)))
(type $rustfn-0-33 (func (param i32 i32) (result i32)))
(type $rustfn-0-44 (func (param i32 i32) (result i32)))
(type $rustfn-0-53 (func (param i32 i32)))
(memory $0 1024 1024)
View gist:098eb194392bb04d80db561fe228c849
// beginning a Binaryen API trace
#include <math.h>
#include <map>
#include "src/binaryen-c.h"
int main() {
std::map<size_t, BinaryenFunctionTypeRef> functionTypes;
std::map<size_t, BinaryenExpressionRef> expressions;
std::map<size_t, BinaryenFunctionRef> functions;
std::map<size_t, RelooperBlockRef> relooperBlocks;
BinaryenModuleRef the_module = NULL;
View gist:f2748e1b0c98b4e39a56356b25e9aaea
[binaryen] FAILED with exit code Some(101)
command: "/usr/local/google/home/eholk/wasm/mir2wasm/target/debug/mir2wasm" "tests/compile-pass/iterator.rs" "-Dwarnings" "--run" "-o" "/usr/local/google/home/eholk/wasm/mir2wasm/target/debug/tests/run-compile-pass/iterator.wasm"
stdout:
stderr:
[wasm-validator error in function $main] 1 != 0: set_local type must match function, on
[none] (set_local $12
[none] (get_local $0)
)
[wasm-validator error in function $main] 1 != 0: set_local type must match function, on
View gist:d65669134782a9eae428dc60880a7f94
$ ./wasm-install/bin/emscripten/emcc hello-wasm.c -s BINARYEN=1
Unknown option '--total-memory'
Traceback (most recent call last):
File "./wasm-install/bin/emscripten/emcc", line 13, in <module>
emcc.run()
File "/usr/local/google/home/eholk/nacl/native_client/toolchain_build/src/subzero/wasm-install/bin/emscripten/emcc.py", line 1848, in run
subprocess.check_call(cmd, stdout=open(wasm_text_target, 'w'))
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/google/home/eholk/wasm/binaryen/bin/asm2wasm', 'a.out.asm.js', '--mapped-globals=a.out.wast.mappedGlobals', '--total-memory=16777216']' returned non-zero exit status 1
View vector-constant.ll
define internal <4 x float> @testConstFloat4() {
; ASM-LABEL: testConstFloat4:
; DIS-LABEL: 00000000 <testConstFloat4>:
; IASM-LABEL: testConstFloat4:
entry:
ret <4 x float> <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00>
; ASM: vadd.f32 q10, q10, q11
; DIS: 1c: ee3aaa0b
View remove-closures.scm
|(remove-closures
(closures
((lambda-type_802
dispatch_803
(closure lambda_233 (int) -> (adt point3f-t_164))
(lambda_801
(__153)
(let ([x_154 float
(call
(var (fn ((ptr FILE)) -> float) file-read-float)
View gist:2860c7a09b67170c637a
(generate [3 3] (lambda (x y) (* (get A x) (get B y))))
<=>
(let ((As (backpermute [3 3] (lambda (x y) x) A))
(Bs (backpermute [3 3] (lambda (x y) y) B)))
(zipWith (*) As Bs))