summaryrefslogtreecommitdiff
path: root/test/wasm2js/refs.2asm.js
blob: c105b1c1cbf934a7a97f3a74ba1711ee8827f384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

function wasm2js_trap() { throw new Error('abort'); }

function asmFunc(imports) {
 var Math_imul = Math.imul;
 var Math_fround = Math.fround;
 var Math_abs = Math.abs;
 var Math_clz32 = Math.clz32;
 var Math_min = Math.min;
 var Math_max = Math.max;
 var Math_floor = Math.floor;
 var Math_ceil = Math.ceil;
 var Math_trunc = Math.trunc;
 var Math_sqrt = Math.sqrt;
 var global = null;
 var global_ref = use_global_ref;
 function null_() {
  return null;
 }
 
 function is_null(ref) {
  return ref == null | 0;
 }
 
 function ref_func() {
  var ref_func_1 = 0;
  ref_func_1 = ref_func_1 + 1 | 0;
  return ref_func;
 }
 
 function ref_eq(x, y) {
  return x == y | 0;
 }
 
 function ref_as(x) {
  return x || wasm2js_trap();
 }
 
 function use_global(x) {
  var temp = null;
  temp = global;
  global = x;
  return temp;
 }
 
 function use_global_ref(x) {
  var temp = null;
  temp = global_ref;
  global_ref = x;
  return temp;
 }
 
 function funcref_temps($0, $1) {
  $1 = +$1;
  var $2 = null, $3 = null;
  $2 = $0;
  loop : while (1) {
   $3 = funcref_temps;
   break loop;
  };
  funcref_temps(funcref_temps, +(+((0 ? $2 : $3) == null | 0)));
 }
 
 function named_type_temps() {
  var $0 = null, wasm2js__ref_null_$func_0_$0_1 = null, wasm2js__ref_null_$func_0_$1_1 = null, wasm2js_i32$0 = 0;
  $0 = named_type_temps;
  return wasm2js__ref_null_$func_0_$0 = null, wasm2js__ref_null_$func_0_$1 = $0 || wasm2js_trap(), wasm2js_i32$0 = 0, wasm2js_i32$0 ? wasm2js__ref_null_$func_0_$0 : wasm2js__ref_null_$func_0_$1;
 }
 
 return {
  "null_": null_, 
  "is_null": is_null, 
  "ref_func": ref_func, 
  "ref_eq": ref_eq, 
  "ref_as": ref_as, 
  "use_global": use_global, 
  "use_global_ref": use_global_ref, 
  "funcref_temps": funcref_temps, 
  "named_type_temps": named_type_temps
 };
}

var retasmFunc = asmFunc({
});
export var null_ = retasmFunc.null_;
export var is_null = retasmFunc.is_null;
export var ref_func = retasmFunc.ref_func;
export var ref_eq = retasmFunc.ref_eq;
export var ref_as = retasmFunc.ref_as;
export var use_global = retasmFunc.use_global;
export var use_global_ref = retasmFunc.use_global_ref;
export var funcref_temps = retasmFunc.funcref_temps;
export var named_type_temps = retasmFunc.named_type_temps;