porffor 0.55.36 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,61 +100,6 @@ export const BuiltinVars = function(ctx) {
100
100
  };
101
101
 
102
102
  export const BuiltinFuncs = function() {
103
- this['f64_%'] = {
104
- params: [ valtypeBinary, valtypeBinary ],
105
- locals: [],
106
- returns: [ valtypeBinary ],
107
- returnType: TYPES.number,
108
- wasm: [ // x - truncf(x / y) * y
109
- [ Opcodes.local_get, 0 ], // x
110
-
111
- [ Opcodes.local_get, 0 ], // x
112
- [ Opcodes.local_get, 1 ], // y
113
-
114
- [ Opcodes.f64_div ],
115
- [ Opcodes.f64_trunc ],
116
-
117
- [ Opcodes.local_get, 1 ], // y
118
- [ Opcodes.f64_mul ],
119
-
120
- [ Opcodes.f64_sub ]
121
- ]
122
- };
123
-
124
- this['f64_**'] = this['i32_**'] = {
125
- params: [ valtypeBinary, valtypeBinary ],
126
- locals: [],
127
- returns: [ valtypeBinary ],
128
- returnType: TYPES.number,
129
- wasm: (scope, { builtin }) => [
130
- [ Opcodes.local_get, 0 ],
131
- number(TYPES.number, Valtype.i32),
132
- [ Opcodes.local_get, 1 ],
133
- number(TYPES.number, Valtype.i32),
134
- [ Opcodes.call, builtin('__Math_pow') ]
135
- ]
136
- };
137
-
138
- // add bitwise ops by converting operands to i32 first
139
- for (const [ char, op ] of [ ['&', Opcodes.i32_and], ['|', Opcodes.i32_or], ['^', Opcodes.i32_xor], ['<<', Opcodes.i32_shl], ['>>', Opcodes.i32_shr_s], ['>>>', Opcodes.i32_shr_u] ]) {
140
- this[`f64_${char}`] = {
141
- params: [ Valtype.f64, Valtype.f64 ],
142
- locals: [],
143
- returns: [ Valtype.f64 ],
144
- returnType: TYPES.number,
145
- wasm: [
146
- [ Opcodes.local_get, 0 ],
147
- Opcodes.i32_trunc_sat_f64_s,
148
-
149
- [ Opcodes.local_get, 1 ],
150
- Opcodes.i32_trunc_sat_f64_s,
151
-
152
- [ op ],
153
- [ Opcodes.f64_convert_i32_s ]
154
- ]
155
- };
156
- }
157
-
158
103
  this.isNaN = {
159
104
  floatOnly: true,
160
105
  params: [ valtypeBinary ],