Skip to content

Commit d15b1c1

Browse files
authored
Update binaryen definitions
Update dists
2 parents 328416b + 7eb6f32 commit d15b1c1

File tree

82 files changed

+23305
-11235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+23305
-11235
lines changed

bindings/dist/transformerBundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/asc.js

Lines changed: 107 additions & 202 deletions
Large diffs are not rendered by default.

dist/asc.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/asc.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assemblyscript.d.ts

Lines changed: 227 additions & 157 deletions
Large diffs are not rendered by default.

dist/assemblyscript.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assemblyscript.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/loader/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function postInstantiate(baseModule, instance) {
192192
? U32[arr + ARRAY_LENGTH_OFFSET >>> 2]
193193
: U32[buf + SIZE_OFFSET >>> 2] >>> align;
194194
return getView(align, info & VAL_SIGNED, info & VAL_FLOAT)
195-
.slice(buf >>>= align, buf + length);
195+
.subarray(buf >>>= align, buf + length);
196196
}
197197

198198
baseModule.__getArrayView = __getArrayView;
@@ -221,8 +221,7 @@ function postInstantiate(baseModule, instance) {
221221
const buffer = memory.buffer;
222222
const U32 = new Uint32Array(buffer);
223223
const bufPtr = U32[ptr + ARRAYBUFFERVIEW_DATASTART_OFFSET >>> 2];
224-
const length = U32[bufPtr + SIZE_OFFSET >>> 2];
225-
return new Type(buffer).slice(bufPtr >>> alignLog2, bufPtr + length >>> alignLog2);
224+
return new Type(buffer, bufPtr, U32[bufPtr + SIZE_OFFSET >>> 2] >>> alignLog2);
226225
}
227226

228227
/** Gets a view on the values of a known-to-be Int8Array in the module's memory. */

lib/loader/tests/assembly/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,11 @@ export const INT32ARRAY_ID = idof<Int32Array>();
7070
export const UINT32ARRAY_ID = idof<Uint32Array>();
7171
export const FLOAT32ARRAY_ID = idof<Float32Array>();
7272
export const ARRAYI32_ID = idof<Array<i32>>();
73+
74+
export function newFloat32Array(size: i32): Float32Array {
75+
return new Float32Array(size);
76+
}
77+
78+
export function modifyFloat32Array(array: Float32Array, index: i32, value: f32): void {
79+
array[index] = value;
80+
}
454 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)