Skip to content

Commit 9c16363

Browse files
committed
Initial external decorator for annotating explicit import names; Use file name as default module name in imports; Emit empty memory if there are no static segments; Update TLSF and examples accordingly
1 parent 27e61f8 commit 9c16363

File tree

110 files changed

+6798
-6486
lines changed

Some content is hidden

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

110 files changed

+6798
-6486
lines changed

cli/asc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ var assemblyscript, isDev;
2323
try {
2424
assemblyscript = require("../dist/assemblyscript.js");
2525
isDev = false;
26-
try { require("source-map-support").install(); } catch (e) {/* optional */}
2726
} catch (e) {
2827
try {
2928
require("ts-node").register({ project: path.join(__dirname, "..", "src", "tsconfig.json") });

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.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.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// On the WASM side, 32-bit color values are modified in ABGR order (alpha, blue, green, red)
2+
// because WASM is little endian. This results in RGBA in memory, which is exactly what the image
3+
// buffer, composed of 8-bit components, expects on the JS side.
4+
export declare const BGR_ALIVE: u32;
5+
export declare const BGR_DEAD: u32;
6+
export declare const BIT_ROT: u32;

examples/game-of-life/assembly/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
// see: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
22

3-
// Configuration imported from JS. On the WASM side, 32-bit color values are modified in ABGR order
4-
// (alpha, blue, green, red) because WASM is little endian. This results in RGBA in memory, which is
5-
// exactly what the image buffer, composed of 8-bit components, expects on the JS side.
6-
declare const BGR_ALIVE: u32;
7-
declare const BGR_DEAD: u32;
8-
declare const BIT_ROT: u32;
3+
// Configuration imported from JS
4+
import { BGR_ALIVE, BGR_DEAD, BIT_ROT } from "./config";
95

106
var w: i32, h: i32, s: i32;
117

9 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)