mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-09 04:51:26 +00:00
Update dist files; Unify some examples
This commit is contained in:
parent
50f6c1c460
commit
2f8f477ab0
2
dist/asc.js
vendored
2
dist/asc.js
vendored
File diff suppressed because one or more lines are too long
2
dist/asc.js.map
vendored
2
dist/asc.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/assemblyscript.js
vendored
2
dist/assemblyscript.js
vendored
File diff suppressed because one or more lines are too long
2
dist/assemblyscript.js.map
vendored
2
dist/assemblyscript.js.map
vendored
File diff suppressed because one or more lines are too long
@ -122,5 +122,11 @@ Building
|
||||
To build [assembly/i64.ts](./assembly/i64.ts) to an untouched and an optimized `.wasm` including their respective `.wat` representations, run:
|
||||
|
||||
```
|
||||
$> npm run build
|
||||
$> npm run asbuild
|
||||
```
|
||||
|
||||
Afterwards, to run the included [test](./tests/index.js):
|
||||
|
||||
```
|
||||
$> npm test
|
||||
```
|
||||
|
@ -1,5 +1,4 @@
|
||||
var lo: u32,
|
||||
hi: u32;
|
||||
var lo: u32, hi: u32;
|
||||
|
||||
export function getLo(): u32 {
|
||||
return lo;
|
||||
|
3
examples/i64-polyfill/build/.gitignore
vendored
Normal file
3
examples/i64-polyfill/build/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*.wasm
|
||||
*.wasm.map
|
||||
*.asm.js
|
@ -181,10 +181,7 @@
|
||||
;;@ assembly/i64.ts:38:2
|
||||
(set_global $assembly/i64/lo
|
||||
;;@ assembly/i64.ts:38:7
|
||||
(i32.and
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ assembly/i64.ts:39:2
|
||||
(set_global $assembly/i64/hi
|
@ -1,7 +1,7 @@
|
||||
var fs = require("fs");
|
||||
|
||||
// Instantiate the module
|
||||
var mod = new WebAssembly.Module(fs.readFileSync(__dirname + "/i64.optimized.wasm"));
|
||||
var mod = new WebAssembly.Module(fs.readFileSync(__dirname + "/build/optimized.wasm"));
|
||||
var ins = new WebAssembly.Instance(mod, { /* no imports */ });
|
||||
|
||||
// Export its exports
|
||||
|
@ -16,14 +16,15 @@
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:untouched && npm run build:optimized",
|
||||
"build:untouched": "asc assembly/i64.ts -t i64.untouched.wat -b i64.untouched.wasm --noMemory --validate --sourceMap --measure",
|
||||
"build:optimized": "asc -O assembly/i64.ts -b i64.optimized.wasm -t i64.optimized.wat --noMemory --validate --sourceMap --measure",
|
||||
"asbuild": "npm run asbuild:untouched && npm run asbuild:optimized",
|
||||
"asbuild:untouched": "asc assembly/i64.ts -t build/untouched.wat -b build/untouched.wasm --noMemory --validate --sourceMap --measure",
|
||||
"asbuild:optimized": "asc -O assembly/i64.ts -b build/optimized.wasm -t build/optimized.wat --noMemory --validate --sourceMap --measure",
|
||||
"test": "node tests"
|
||||
},
|
||||
"files": [
|
||||
"assembly/",
|
||||
"i64.optimized.wasm",
|
||||
"build/optimized.wasm",
|
||||
"build/optimized.wasm.map",
|
||||
"index.d.ts",
|
||||
"index.js",
|
||||
"README.md"
|
||||
|
@ -38,3 +38,5 @@ assertUnary(i64.eqz, 1, 0, 0, 0);
|
||||
assertUnary(i64.eqz, 1, 1, 0, 0);
|
||||
|
||||
// TODO...
|
||||
|
||||
console.log("ok");
|
||||
|
@ -9,7 +9,7 @@ Instructions
|
||||
To build [assembly/pson.ts](./assembly/pson.ts) to an untouched and an optimized `.wasm` including their respective `.wat` representations, run:
|
||||
|
||||
```
|
||||
$> npm run build
|
||||
$> npm run asbuild
|
||||
```
|
||||
|
||||
Afterwards, to run the included [test](./tests/index.js):
|
||||
|
@ -40,10 +40,8 @@ var offset: usize = 0;
|
||||
|
||||
export function decode(length: usize): void {
|
||||
offset = 0;
|
||||
while (offset < length) {
|
||||
decodeValue();
|
||||
}
|
||||
assert(offset == length);
|
||||
while (offset < length) decodeValue();
|
||||
if (offset != length) unreachable();
|
||||
}
|
||||
|
||||
function decodeValue(): void {
|
||||
@ -51,96 +49,94 @@ function decodeValue(): void {
|
||||
var size: u32;
|
||||
var long: u64;
|
||||
switch (token) {
|
||||
|
||||
case Token.NULL:
|
||||
case Token.NULL: {
|
||||
pson.onNull();
|
||||
break;
|
||||
|
||||
case Token.TRUE:
|
||||
}
|
||||
case Token.TRUE: {
|
||||
pson.onTrue();
|
||||
break;
|
||||
|
||||
case Token.FALSE:
|
||||
}
|
||||
case Token.FALSE: {
|
||||
pson.onFalse();
|
||||
break;
|
||||
|
||||
case Token.EOBJECT:
|
||||
}
|
||||
case Token.EOBJECT: {
|
||||
pson.onEObject();
|
||||
break;
|
||||
|
||||
case Token.EARRAY:
|
||||
}
|
||||
case Token.EARRAY: {
|
||||
pson.onEArray();
|
||||
break;
|
||||
|
||||
case Token.ESTRING:
|
||||
}
|
||||
case Token.ESTRING: {
|
||||
pson.onEString();
|
||||
break;
|
||||
|
||||
case Token.OBJECT:
|
||||
}
|
||||
case Token.OBJECT: {
|
||||
pson.onObject(size = readVarint32());
|
||||
while (size--) {
|
||||
decodeValue();
|
||||
decodeValue();
|
||||
}
|
||||
break;
|
||||
|
||||
case Token.ARRAY:
|
||||
pson.onArray(size = readVarint32());
|
||||
while (size--) {
|
||||
decodeValue();
|
||||
}
|
||||
case Token.ARRAY: {
|
||||
pson.onArray(size = readVarint32());
|
||||
while (size--) decodeValue();
|
||||
break;
|
||||
|
||||
case Token.INTEGER:
|
||||
}
|
||||
case Token.INTEGER: {
|
||||
pson.onInteger(((size = readVarint32()) >> 1) ^ -(size & 1));
|
||||
break;
|
||||
|
||||
case Token.LONG:
|
||||
}
|
||||
case Token.LONG: {
|
||||
long = ((long = readVarint64()) >> 1) ^ -(long & 1);
|
||||
pson.onLong(<i32>long, <i32>(long >>> 32));
|
||||
break;
|
||||
|
||||
case Token.FLOAT:
|
||||
}
|
||||
case Token.FLOAT: {
|
||||
pson.onFloat(load<f32>(offset));
|
||||
offset += 4;
|
||||
break;
|
||||
|
||||
case Token.DOUBLE:
|
||||
}
|
||||
case Token.DOUBLE: {
|
||||
pson.onDouble(load<f64>(offset));
|
||||
offset += 8;
|
||||
break;
|
||||
|
||||
case Token.STRING:
|
||||
}
|
||||
case Token.STRING: {
|
||||
size = readVarint32();
|
||||
pson.onString(offset, size);
|
||||
offset += size;
|
||||
break;
|
||||
|
||||
}
|
||||
case Token.STRING_ADD:
|
||||
case Token.STRING_GET:
|
||||
case Token.STRING_GET: {
|
||||
// could be implemented via imports as well, but isn't necessary for this example
|
||||
throw new Error("not implemented");
|
||||
|
||||
case Token.BINARY:
|
||||
unreachable();
|
||||
break;
|
||||
}
|
||||
case Token.BINARY: {
|
||||
size = readVarint32();
|
||||
pson.onBinary(offset, size);
|
||||
offset += size;
|
||||
break;
|
||||
|
||||
default: // small integer?
|
||||
if (token > <u32>Token.MAX) {
|
||||
throw new Error("unexpected token");
|
||||
}
|
||||
default: { // small integer?
|
||||
if (token > <u32>Token.MAX) unreachable();
|
||||
pson.onInteger((token >> 1) ^ -(token & 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function readVarint32(): u32 {
|
||||
var value: u32 = 0;
|
||||
var shift: u32 = 0;
|
||||
var b: u8;
|
||||
do {
|
||||
var b = load<u8>(offset++);
|
||||
b = load<u8>(offset++);
|
||||
value |= <u32>(b & 0x7f) << (7 * shift++);
|
||||
} while (b & 0x80);
|
||||
return value;
|
||||
@ -149,8 +145,9 @@ function readVarint32(): u32 {
|
||||
function readVarint64(): u64 {
|
||||
var value: u64 = 0;
|
||||
var shift: u64 = 0;
|
||||
var b: u8;
|
||||
do {
|
||||
var b = load<u8>(offset++);
|
||||
b = load<u8>(offset++);
|
||||
value |= <u64>(b & 0x7f) << (7 * shift++);
|
||||
} while (b & 0x80);
|
||||
return value;
|
||||
|
3
examples/pson/build/.gitignore
vendored
Normal file
3
examples/pson/build/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*.wasm
|
||||
*.wasm.map
|
||||
*.asm.js
|
@ -1,12 +1,11 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(type $i (func (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $i (func (result i32)))
|
||||
(type $v (func))
|
||||
(type $I (func (result i64)))
|
||||
(type $iiv (func (param i32 i32)))
|
||||
(type $fv (func (param f32)))
|
||||
(type $Fv (func (param f64)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(import "pson" "onNull" (func $assembly/pson/pson.onNull))
|
||||
(import "pson" "onTrue" (func $assembly/pson/pson.onTrue))
|
||||
(import "pson" "onFalse" (func $assembly/pson/pson.onFalse))
|
||||
@ -21,22 +20,20 @@
|
||||
(import "pson" "onDouble" (func $assembly/pson/pson.onDouble (param f64)))
|
||||
(import "pson" "onString" (func $assembly/pson/pson.onString (param i32 i32)))
|
||||
(import "pson" "onBinary" (func $assembly/pson/pson.onBinary (param i32 i32)))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $assembly/pson/offset (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\10\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00p\00s\00o\00n\00.\00t\00s")
|
||||
(export "decode" (func $assembly/pson/decode))
|
||||
(export "memory" (memory $0))
|
||||
(func $assembly/pson/readVarint32 (; 15 ;) (type $i) (result i32)
|
||||
(func $assembly/pson/readVarint32 (; 14 ;) (type $i) (result i32)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(loop $continue|0
|
||||
;;@ assembly/pson.ts:144:4
|
||||
;;@ assembly/pson.ts:140:4
|
||||
(set_local $0
|
||||
(i32.or
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:143:21
|
||||
;;@ assembly/pson.ts:139:17
|
||||
(block (result i32)
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
@ -46,20 +43,20 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:144:13
|
||||
;;@ assembly/pson.ts:140:13
|
||||
(i32.shl
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:143:4
|
||||
;;@ assembly/pson.ts:139:4
|
||||
(tee_local $2
|
||||
;;@ assembly/pson.ts:143:12
|
||||
;;@ assembly/pson.ts:139:8
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:144:23
|
||||
;;@ assembly/pson.ts:140:23
|
||||
(i32.const 127)
|
||||
)
|
||||
;;@ assembly/pson.ts:144:37
|
||||
;;@ assembly/pson.ts:140:37
|
||||
(block (result i32)
|
||||
(set_local $1
|
||||
(i32.add
|
||||
@ -69,10 +66,10 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:144:32
|
||||
;;@ assembly/pson.ts:140:32
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:144:33
|
||||
;;@ assembly/pson.ts:140:33
|
||||
(i32.const 7)
|
||||
)
|
||||
)
|
||||
@ -81,27 +78,27 @@
|
||||
)
|
||||
)
|
||||
(br_if $continue|0
|
||||
;;@ assembly/pson.ts:141:11
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:145:11
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:145:15
|
||||
;;@ assembly/pson.ts:141:15
|
||||
(i32.const 128)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:146:9
|
||||
;;@ assembly/pson.ts:142:9
|
||||
(get_local $0)
|
||||
)
|
||||
(func $assembly/pson/readVarint64 (; 16 ;) (type $I) (result i64)
|
||||
(func $assembly/pson/readVarint64 (; 15 ;) (type $I) (result i64)
|
||||
(local $0 i64)
|
||||
(local $1 i32)
|
||||
(local $2 i64)
|
||||
(loop $continue|0
|
||||
;;@ assembly/pson.ts:154:4
|
||||
;;@ assembly/pson.ts:151:4
|
||||
(set_local $0
|
||||
(i64.or
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:153:21
|
||||
;;@ assembly/pson.ts:150:17
|
||||
(block (result i64)
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
@ -114,31 +111,32 @@
|
||||
(set_local $2
|
||||
(i64.add
|
||||
(tee_local $0
|
||||
;;@ assembly/pson.ts:154:37
|
||||
;;@ assembly/pson.ts:151:37
|
||||
(get_local $2)
|
||||
)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:154:13
|
||||
;;@ assembly/pson.ts:151:13
|
||||
(i64.shl
|
||||
(i64.extend_u/i32
|
||||
;;@ assembly/pson.ts:151:19
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:153:4
|
||||
;;@ assembly/pson.ts:150:4
|
||||
(tee_local $1
|
||||
;;@ assembly/pson.ts:153:12
|
||||
;;@ assembly/pson.ts:150:8
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:154:23
|
||||
;;@ assembly/pson.ts:151:23
|
||||
(i32.const 127)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:154:32
|
||||
;;@ assembly/pson.ts:151:32
|
||||
(i64.mul
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:154:33
|
||||
;;@ assembly/pson.ts:151:33
|
||||
(i64.const 7)
|
||||
)
|
||||
)
|
||||
@ -146,22 +144,22 @@
|
||||
)
|
||||
)
|
||||
(br_if $continue|0
|
||||
;;@ assembly/pson.ts:152:11
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:155:11
|
||||
(get_local $1)
|
||||
;;@ assembly/pson.ts:155:15
|
||||
;;@ assembly/pson.ts:152:15
|
||||
(i32.const 128)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:156:9
|
||||
;;@ assembly/pson.ts:153:9
|
||||
(get_local $0)
|
||||
)
|
||||
(func $assembly/pson/decodeValue (; 17 ;) (type $v)
|
||||
(func $assembly/pson/decodeValue (; 16 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i64)
|
||||
;;@ assembly/pson.ts:53:2
|
||||
;;@ assembly/pson.ts:51:2
|
||||
(block $break|0
|
||||
(block $case16|0
|
||||
(block $case15|0
|
||||
@ -183,7 +181,7 @@
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(tee_local $1
|
||||
;;@ assembly/pson.ts:50:28
|
||||
;;@ assembly/pson.ts:48:28
|
||||
(get_global $assembly/pson/offset)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -192,9 +190,9 @@
|
||||
(br_table $case0|0 $case1|0 $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $case11|0 $case12|0 $tablify|0
|
||||
(i32.sub
|
||||
(tee_local $1
|
||||
;;@ assembly/pson.ts:50:2
|
||||
;;@ assembly/pson.ts:48:2
|
||||
(tee_local $0
|
||||
;;@ assembly/pson.ts:50:19
|
||||
;;@ assembly/pson.ts:48:19
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
@ -208,12 +206,12 @@
|
||||
(i32.or
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ assembly/pson.ts:119:9
|
||||
;;@ assembly/pson.ts:114:9
|
||||
(i32.const 253)
|
||||
)
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ assembly/pson.ts:120:9
|
||||
;;@ assembly/pson.ts:115:9
|
||||
(i32.const 254)
|
||||
)
|
||||
)
|
||||
@ -221,53 +219,53 @@
|
||||
(br_if $case15|0
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ assembly/pson.ts:124:9
|
||||
;;@ assembly/pson.ts:120:9
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(br $case16|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:56:11
|
||||
;;@ assembly/pson.ts:53:11
|
||||
(call $assembly/pson/pson.onNull)
|
||||
;;@ assembly/pson.ts:57:6
|
||||
;;@ assembly/pson.ts:54:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:60:11
|
||||
;;@ assembly/pson.ts:57:11
|
||||
(call $assembly/pson/pson.onTrue)
|
||||
;;@ assembly/pson.ts:61:6
|
||||
;;@ assembly/pson.ts:58:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:64:11
|
||||
;;@ assembly/pson.ts:61:11
|
||||
(call $assembly/pson/pson.onFalse)
|
||||
;;@ assembly/pson.ts:65:6
|
||||
;;@ assembly/pson.ts:62:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:68:11
|
||||
;;@ assembly/pson.ts:65:11
|
||||
(call $assembly/pson/pson.onEObject)
|
||||
;;@ assembly/pson.ts:69:6
|
||||
;;@ assembly/pson.ts:66:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:72:11
|
||||
;;@ assembly/pson.ts:69:11
|
||||
(call $assembly/pson/pson.onEArray)
|
||||
;;@ assembly/pson.ts:73:6
|
||||
;;@ assembly/pson.ts:70:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:76:11
|
||||
;;@ assembly/pson.ts:73:11
|
||||
(call $assembly/pson/pson.onEString)
|
||||
;;@ assembly/pson.ts:77:6
|
||||
;;@ assembly/pson.ts:74:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:80:11
|
||||
;;@ assembly/pson.ts:77:11
|
||||
(call $assembly/pson/pson.onObject
|
||||
;;@ assembly/pson.ts:80:20
|
||||
;;@ assembly/pson.ts:77:20
|
||||
(tee_local $0
|
||||
;;@ assembly/pson.ts:80:27
|
||||
;;@ assembly/pson.ts:77:27
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
;;@ assembly/pson.ts:81:13
|
||||
;;@ assembly/pson.ts:78:13
|
||||
(block (result i32)
|
||||
(set_local $0
|
||||
(i32.sub
|
||||
@ -280,28 +278,28 @@
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
;;@ assembly/pson.ts:82:8
|
||||
;;@ assembly/pson.ts:79:8
|
||||
(call $assembly/pson/decodeValue)
|
||||
;;@ assembly/pson.ts:83:8
|
||||
;;@ assembly/pson.ts:80:8
|
||||
(call $assembly/pson/decodeValue)
|
||||
(br $continue|1)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:85:6
|
||||
;;@ assembly/pson.ts:82:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:88:11
|
||||
;;@ assembly/pson.ts:85:11
|
||||
(call $assembly/pson/pson.onArray
|
||||
;;@ assembly/pson.ts:88:19
|
||||
;;@ assembly/pson.ts:85:19
|
||||
(tee_local $0
|
||||
;;@ assembly/pson.ts:88:26
|
||||
;;@ assembly/pson.ts:85:26
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
)
|
||||
(loop $continue|2
|
||||
(if
|
||||
;;@ assembly/pson.ts:89:13
|
||||
;;@ assembly/pson.ts:86:13
|
||||
(block (result i32)
|
||||
(set_local $0
|
||||
(i32.sub
|
||||
@ -314,93 +312,112 @@
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
;;@ assembly/pson.ts:90:8
|
||||
;;@ assembly/pson.ts:86:21
|
||||
(call $assembly/pson/decodeValue)
|
||||
(br $continue|2)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:92:6
|
||||
;;@ assembly/pson.ts:87:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:90:11
|
||||
(call $assembly/pson/pson.onInteger
|
||||
;;@ assembly/pson.ts:90:21
|
||||
(i32.xor
|
||||
(i32.shr_u
|
||||
;;@ assembly/pson.ts:90:22
|
||||
(tee_local $0
|
||||
;;@ assembly/pson.ts:90:30
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
;;@ assembly/pson.ts:90:49
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ assembly/pson.ts:90:54
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
;;@ assembly/pson.ts:90:55
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:90:56
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:90:63
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:91:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:95:11
|
||||
(call $assembly/pson/pson.onInteger
|
||||
;;@ assembly/pson.ts:95:21
|
||||
(i32.xor
|
||||
(i32.shr_u
|
||||
;;@ assembly/pson.ts:95:22
|
||||
(tee_local $0
|
||||
;;@ assembly/pson.ts:95:30
|
||||
(call $assembly/pson/readVarint32)
|
||||
(call $assembly/pson/pson.onLong
|
||||
;;@ assembly/pson.ts:95:18
|
||||
(i32.wrap/i64
|
||||
;;@ assembly/pson.ts:94:6
|
||||
(tee_local $2
|
||||
;;@ assembly/pson.ts:94:13
|
||||
(i64.xor
|
||||
(i64.shr_u
|
||||
;;@ assembly/pson.ts:94:14
|
||||
(tee_local $2
|
||||
;;@ assembly/pson.ts:94:22
|
||||
(call $assembly/pson/readVarint64)
|
||||
)
|
||||
;;@ assembly/pson.ts:95:49
|
||||
(i32.const 1)
|
||||
;;@ assembly/pson.ts:94:41
|
||||
(i64.const 1)
|
||||
)
|
||||
;;@ assembly/pson.ts:95:54
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
;;@ assembly/pson.ts:95:55
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:95:56
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:95:63
|
||||
(i32.const 1)
|
||||
;;@ assembly/pson.ts:94:46
|
||||
(i64.sub
|
||||
(i64.const 0)
|
||||
;;@ assembly/pson.ts:94:47
|
||||
(i64.and
|
||||
;;@ assembly/pson.ts:94:48
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:94:55
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:95:29
|
||||
(i32.wrap/i64
|
||||
;;@ assembly/pson.ts:95:35
|
||||
(i64.shr_u
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:95:44
|
||||
(i64.const 32)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:96:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:100:11
|
||||
(call $assembly/pson/pson.onLong
|
||||
;;@ assembly/pson.ts:100:18
|
||||
(i32.wrap/i64
|
||||
;;@ assembly/pson.ts:99:6
|
||||
(tee_local $2
|
||||
;;@ assembly/pson.ts:99:13
|
||||
(i64.xor
|
||||
(i64.shr_u
|
||||
;;@ assembly/pson.ts:99:14
|
||||
(tee_local $2
|
||||
;;@ assembly/pson.ts:99:22
|
||||
(call $assembly/pson/readVarint64)
|
||||
)
|
||||
;;@ assembly/pson.ts:99:41
|
||||
(i64.const 1)
|
||||
)
|
||||
;;@ assembly/pson.ts:99:46
|
||||
(i64.sub
|
||||
(i64.const 0)
|
||||
;;@ assembly/pson.ts:99:47
|
||||
(i64.and
|
||||
;;@ assembly/pson.ts:99:48
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:99:55
|
||||
(i64.const 1)
|
||||
;;@ assembly/pson.ts:99:11
|
||||
(call $assembly/pson/pson.onFloat
|
||||
;;@ assembly/pson.ts:99:19
|
||||
(f32.load
|
||||
;;@ assembly/pson.ts:99:29
|
||||
(get_global $assembly/pson/offset)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:100:29
|
||||
(i32.wrap/i64
|
||||
;;@ assembly/pson.ts:100:35
|
||||
(i64.shr_u
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:100:44
|
||||
(i64.const 32)
|
||||
)
|
||||
;;@ assembly/pson.ts:100:6
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:100:16
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:101:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:104:11
|
||||
(call $assembly/pson/pson.onFloat
|
||||
;;@ assembly/pson.ts:104:19
|
||||
(f32.load
|
||||
;;@ assembly/pson.ts:104:29
|
||||
(call $assembly/pson/pson.onDouble
|
||||
;;@ assembly/pson.ts:104:20
|
||||
(f64.load
|
||||
;;@ assembly/pson.ts:104:30
|
||||
(get_global $assembly/pson/offset)
|
||||
)
|
||||
)
|
||||
@ -409,109 +426,90 @@
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:105:16
|
||||
(i32.const 4)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:106:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:109:11
|
||||
(call $assembly/pson/pson.onDouble
|
||||
;;@ assembly/pson.ts:109:20
|
||||
(f64.load
|
||||
;;@ assembly/pson.ts:109:30
|
||||
;;@ assembly/pson.ts:109:6
|
||||
(set_local $0
|
||||
;;@ assembly/pson.ts:109:13
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
;;@ assembly/pson.ts:110:11
|
||||
(call $assembly/pson/pson.onString
|
||||
;;@ assembly/pson.ts:110:20
|
||||
(get_global $assembly/pson/offset)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:110:6
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:110:16
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ assembly/pson.ts:110:28
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ assembly/pson.ts:111:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:114:6
|
||||
(set_local $0
|
||||
;;@ assembly/pson.ts:114:13
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
;;@ assembly/pson.ts:115:11
|
||||
(call $assembly/pson/pson.onString
|
||||
;;@ assembly/pson.ts:115:20
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:115:28
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ assembly/pson.ts:116:6
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:116:16
|
||||
;;@ assembly/pson.ts:111:16
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:112:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:117:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:122:6
|
||||
(unreachable)
|
||||
)
|
||||
;;@ assembly/pson.ts:125:6
|
||||
;;@ assembly/pson.ts:121:6
|
||||
(set_local $0
|
||||
;;@ assembly/pson.ts:125:13
|
||||
;;@ assembly/pson.ts:121:13
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
;;@ assembly/pson.ts:126:11
|
||||
;;@ assembly/pson.ts:122:11
|
||||
(call $assembly/pson/pson.onBinary
|
||||
;;@ assembly/pson.ts:126:20
|
||||
;;@ assembly/pson.ts:122:20
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:126:28
|
||||
;;@ assembly/pson.ts:122:28
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ assembly/pson.ts:127:6
|
||||
;;@ assembly/pson.ts:123:6
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:127:16
|
||||
;;@ assembly/pson.ts:123:16
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:128:6
|
||||
;;@ assembly/pson.ts:124:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:131:6
|
||||
;;@ assembly/pson.ts:127:6
|
||||
(if
|
||||
;;@ assembly/pson.ts:131:10
|
||||
;;@ assembly/pson.ts:127:10
|
||||
(i32.gt_u
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:131:18
|
||||
;;@ assembly/pson.ts:127:18
|
||||
(i32.const 239)
|
||||
)
|
||||
;;@ assembly/pson.ts:132:8
|
||||
;;@ assembly/pson.ts:127:34
|
||||
(unreachable)
|
||||
)
|
||||
;;@ assembly/pson.ts:134:11
|
||||
;;@ assembly/pson.ts:128:11
|
||||
(call $assembly/pson/pson.onInteger
|
||||
;;@ assembly/pson.ts:134:21
|
||||
;;@ assembly/pson.ts:128:21
|
||||
(i32.xor
|
||||
(i32.shr_u
|
||||
;;@ assembly/pson.ts:134:22
|
||||
;;@ assembly/pson.ts:128:22
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:134:31
|
||||
;;@ assembly/pson.ts:128:31
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ assembly/pson.ts:134:36
|
||||
;;@ assembly/pson.ts:128:36
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
;;@ assembly/pson.ts:134:37
|
||||
;;@ assembly/pson.ts:128:37
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:134:38
|
||||
;;@ assembly/pson.ts:128:38
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:134:46
|
||||
;;@ assembly/pson.ts:128:46
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
@ -519,7 +517,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $assembly/pson/decode (; 18 ;) (type $iv) (param $0 i32)
|
||||
(func $assembly/pson/decode (; 17 ;) (type $iv) (param $0 i32)
|
||||
;;@ assembly/pson.ts:42:2
|
||||
(set_global $assembly/pson/offset
|
||||
;;@ assembly/pson.ts:42:11
|
||||
@ -534,29 +532,22 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(block
|
||||
;;@ assembly/pson.ts:44:4
|
||||
;;@ assembly/pson.ts:43:26
|
||||
(call $assembly/pson/decodeValue)
|
||||
(br $continue|0)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:46:2
|
||||
;;@ assembly/pson.ts:44:2
|
||||
(if
|
||||
;;@ assembly/pson.ts:46:9
|
||||
;;@ assembly/pson.ts:44:6
|
||||
(i32.ne
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:46:19
|
||||
;;@ assembly/pson.ts:44:16
|
||||
(get_local $0)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 46)
|
||||
(i32.const 2)
|
||||
)
|
||||
;;@ assembly/pson.ts:44:24
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
@ -1,12 +1,11 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(type $i (func (result i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $i (func (result i32)))
|
||||
(type $v (func))
|
||||
(type $I (func (result i64)))
|
||||
(type $iiv (func (param i32 i32)))
|
||||
(type $fv (func (param f32)))
|
||||
(type $Fv (func (param f64)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(import "pson" "onNull" (func $assembly/pson/pson.onNull))
|
||||
(import "pson" "onTrue" (func $assembly/pson/pson.onTrue))
|
||||
(import "pson" "onFalse" (func $assembly/pson/pson.onFalse))
|
||||
@ -21,7 +20,6 @@
|
||||
(import "pson" "onDouble" (func $assembly/pson/pson.onDouble (param f64)))
|
||||
(import "pson" "onString" (func $assembly/pson/pson.onString (param i32 i32)))
|
||||
(import "pson" "onBinary" (func $assembly/pson/pson.onBinary (param i32 i32)))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $assembly/pson/offset (mut i32) (i32.const 0))
|
||||
(global $assembly/pson/Token.ZERO i32 (i32.const 0))
|
||||
(global $assembly/pson/Token.MAX i32 (i32.const 239))
|
||||
@ -41,81 +39,79 @@
|
||||
(global $assembly/pson/Token.STRING_ADD i32 (i32.const 253))
|
||||
(global $assembly/pson/Token.STRING_GET i32 (i32.const 254))
|
||||
(global $assembly/pson/Token.BINARY i32 (i32.const 255))
|
||||
(global $HEAP_BASE i32 (i32.const 40))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\10\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00p\00s\00o\00n\00.\00t\00s\00")
|
||||
(export "decode" (func $assembly/pson/decode))
|
||||
(export "memory" (memory $0))
|
||||
(func $assembly/pson/readVarint32 (; 15 ;) (type $i) (result i32)
|
||||
(func $assembly/pson/readVarint32 (; 14 ;) (type $i) (result i32)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
;;@ assembly/pson.ts:140:2
|
||||
;;@ assembly/pson.ts:135:2
|
||||
(set_local $0
|
||||
;;@ assembly/pson.ts:140:19
|
||||
;;@ assembly/pson.ts:135:19
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ assembly/pson.ts:141:2
|
||||
;;@ assembly/pson.ts:136:2
|
||||
(set_local $1
|
||||
;;@ assembly/pson.ts:141:19
|
||||
;;@ assembly/pson.ts:136:19
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ assembly/pson.ts:142:2
|
||||
;;@ assembly/pson.ts:137:2
|
||||
(nop)
|
||||
;;@ assembly/pson.ts:138:2
|
||||
(block $break|0
|
||||
(loop $continue|0
|
||||
;;@ assembly/pson.ts:142:5
|
||||
;;@ assembly/pson.ts:138:5
|
||||
(block
|
||||
;;@ assembly/pson.ts:143:4
|
||||
(set_local $3
|
||||
;;@ assembly/pson.ts:143:12
|
||||
(i32.load8_u
|
||||
;;@ assembly/pson.ts:143:21
|
||||
(block (result i32)
|
||||
;;@ assembly/pson.ts:139:4
|
||||
(set_local $2
|
||||
;;@ assembly/pson.ts:139:8
|
||||
(i32.load8_u
|
||||
;;@ assembly/pson.ts:139:17
|
||||
(block (result i32)
|
||||
(set_local $3
|
||||
(get_global $assembly/pson/offset)
|
||||
)
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:144:4
|
||||
;;@ assembly/pson.ts:140:4
|
||||
(set_local $0
|
||||
(i32.or
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:144:13
|
||||
;;@ assembly/pson.ts:140:13
|
||||
(i32.shl
|
||||
(i32.and
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:144:19
|
||||
(get_local $3)
|
||||
;;@ assembly/pson.ts:144:23
|
||||
;;@ assembly/pson.ts:140:19
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:140:23
|
||||
(i32.const 127)
|
||||
)
|
||||
(i32.const 255)
|
||||
)
|
||||
;;@ assembly/pson.ts:144:32
|
||||
;;@ assembly/pson.ts:140:32
|
||||
(i32.mul
|
||||
;;@ assembly/pson.ts:144:33
|
||||
;;@ assembly/pson.ts:140:33
|
||||
(i32.const 7)
|
||||
;;@ assembly/pson.ts:144:37
|
||||
;;@ assembly/pson.ts:140:37
|
||||
(block (result i32)
|
||||
(set_local $2
|
||||
(set_local $3
|
||||
(get_local $1)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -123,85 +119,81 @@
|
||||
)
|
||||
)
|
||||
(br_if $continue|0
|
||||
;;@ assembly/pson.ts:145:11
|
||||
;;@ assembly/pson.ts:141:11
|
||||
(i32.and
|
||||
(i32.and
|
||||
(get_local $3)
|
||||
;;@ assembly/pson.ts:145:15
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:141:15
|
||||
(i32.const 128)
|
||||
)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:146:9
|
||||
;;@ assembly/pson.ts:142:9
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $assembly/pson/readVarint64 (; 16 ;) (type $I) (result i64)
|
||||
(func $assembly/pson/readVarint64 (; 15 ;) (type $I) (result i64)
|
||||
(local $0 i64)
|
||||
(local $1 i64)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i64)
|
||||
;;@ assembly/pson.ts:150:2
|
||||
;;@ assembly/pson.ts:146:2
|
||||
(set_local $0
|
||||
;;@ assembly/pson.ts:150:19
|
||||
;;@ assembly/pson.ts:146:19
|
||||
(i64.const 0)
|
||||
)
|
||||
;;@ assembly/pson.ts:151:2
|
||||
;;@ assembly/pson.ts:147:2
|
||||
(set_local $1
|
||||
;;@ assembly/pson.ts:151:19
|
||||
;;@ assembly/pson.ts:147:19
|
||||
(i64.const 0)
|
||||
)
|
||||
;;@ assembly/pson.ts:152:2
|
||||
;;@ assembly/pson.ts:148:2
|
||||
(nop)
|
||||
;;@ assembly/pson.ts:149:2
|
||||
(block $break|0
|
||||
(loop $continue|0
|
||||
;;@ assembly/pson.ts:152:5
|
||||
;;@ assembly/pson.ts:149:5
|
||||
(block
|
||||
;;@ assembly/pson.ts:153:4
|
||||
(set_local $3
|
||||
;;@ assembly/pson.ts:153:12
|
||||
(i32.load8_u
|
||||
;;@ assembly/pson.ts:153:21
|
||||
(block (result i32)
|
||||
;;@ assembly/pson.ts:150:4
|
||||
(set_local $2
|
||||
;;@ assembly/pson.ts:150:8
|
||||
(i32.load8_u
|
||||
;;@ assembly/pson.ts:150:17
|
||||
(block (result i32)
|
||||
(set_local $3
|
||||
(get_global $assembly/pson/offset)
|
||||
)
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:154:4
|
||||
;;@ assembly/pson.ts:151:4
|
||||
(set_local $0
|
||||
(i64.or
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:154:13
|
||||
;;@ assembly/pson.ts:151:13
|
||||
(i64.shl
|
||||
(i64.extend_u/i32
|
||||
;;@ assembly/pson.ts:154:19
|
||||
;;@ assembly/pson.ts:151:19
|
||||
(i32.and
|
||||
(i32.and
|
||||
(get_local $3)
|
||||
;;@ assembly/pson.ts:154:23
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:151:23
|
||||
(i32.const 127)
|
||||
)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:154:32
|
||||
;;@ assembly/pson.ts:151:32
|
||||
(i64.mul
|
||||
;;@ assembly/pson.ts:154:33
|
||||
;;@ assembly/pson.ts:151:33
|
||||
(i64.const 7)
|
||||
;;@ assembly/pson.ts:154:37
|
||||
;;@ assembly/pson.ts:151:37
|
||||
(block (result i64)
|
||||
(set_local $4
|
||||
(get_local $1)
|
||||
@ -220,33 +212,30 @@
|
||||
)
|
||||
)
|
||||
(br_if $continue|0
|
||||
;;@ assembly/pson.ts:155:11
|
||||
;;@ assembly/pson.ts:152:11
|
||||
(i32.and
|
||||
(i32.and
|
||||
(get_local $3)
|
||||
;;@ assembly/pson.ts:155:15
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:152:15
|
||||
(i32.const 128)
|
||||
)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:156:9
|
||||
;;@ assembly/pson.ts:153:9
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $assembly/pson/decodeValue (; 17 ;) (type $v)
|
||||
(func $assembly/pson/decodeValue (; 16 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i64)
|
||||
;;@ assembly/pson.ts:50:2
|
||||
;;@ assembly/pson.ts:48:2
|
||||
(set_local $1
|
||||
;;@ assembly/pson.ts:50:19
|
||||
;;@ assembly/pson.ts:48:19
|
||||
(i32.load8_u
|
||||
;;@ assembly/pson.ts:50:28
|
||||
;;@ assembly/pson.ts:48:28
|
||||
(block (result i32)
|
||||
(set_local $0
|
||||
(get_global $assembly/pson/offset)
|
||||
@ -261,11 +250,11 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:49:2
|
||||
(nop)
|
||||
;;@ assembly/pson.ts:50:2
|
||||
(nop)
|
||||
;;@ assembly/pson.ts:51:2
|
||||
(nop)
|
||||
;;@ assembly/pson.ts:52:2
|
||||
(nop)
|
||||
;;@ assembly/pson.ts:53:2
|
||||
(block $break|0
|
||||
(block $case16|0
|
||||
(block $case15|0
|
||||
@ -285,166 +274,186 @@
|
||||
(block $case1|0
|
||||
(block $case0|0
|
||||
(set_local $0
|
||||
;;@ assembly/pson.ts:53:10
|
||||
;;@ assembly/pson.ts:51:10
|
||||
(get_local $1)
|
||||
)
|
||||
(br_if $case0|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:55:9
|
||||
;;@ assembly/pson.ts:52:9
|
||||
(i32.const 240)
|
||||
)
|
||||
)
|
||||
(br_if $case1|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:59:9
|
||||
;;@ assembly/pson.ts:56:9
|
||||
(i32.const 241)
|
||||
)
|
||||
)
|
||||
(br_if $case2|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:63:9
|
||||
;;@ assembly/pson.ts:60:9
|
||||
(i32.const 242)
|
||||
)
|
||||
)
|
||||
(br_if $case3|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:67:9
|
||||
;;@ assembly/pson.ts:64:9
|
||||
(i32.const 243)
|
||||
)
|
||||
)
|
||||
(br_if $case4|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:71:9
|
||||
;;@ assembly/pson.ts:68:9
|
||||
(i32.const 244)
|
||||
)
|
||||
)
|
||||
(br_if $case5|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:75:9
|
||||
;;@ assembly/pson.ts:72:9
|
||||
(i32.const 245)
|
||||
)
|
||||
)
|
||||
(br_if $case6|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:79:9
|
||||
;;@ assembly/pson.ts:76:9
|
||||
(i32.const 246)
|
||||
)
|
||||
)
|
||||
(br_if $case7|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:87:9
|
||||
;;@ assembly/pson.ts:84:9
|
||||
(i32.const 247)
|
||||
)
|
||||
)
|
||||
(br_if $case8|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:94:9
|
||||
;;@ assembly/pson.ts:89:9
|
||||
(i32.const 248)
|
||||
)
|
||||
)
|
||||
(br_if $case9|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:98:9
|
||||
;;@ assembly/pson.ts:93:9
|
||||
(i32.const 249)
|
||||
)
|
||||
)
|
||||
(br_if $case10|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:103:9
|
||||
;;@ assembly/pson.ts:98:9
|
||||
(i32.const 250)
|
||||
)
|
||||
)
|
||||
(br_if $case11|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:108:9
|
||||
;;@ assembly/pson.ts:103:9
|
||||
(i32.const 251)
|
||||
)
|
||||
)
|
||||
(br_if $case12|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:113:9
|
||||
;;@ assembly/pson.ts:108:9
|
||||
(i32.const 252)
|
||||
)
|
||||
)
|
||||
(br_if $case13|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:119:9
|
||||
;;@ assembly/pson.ts:114:9
|
||||
(i32.const 253)
|
||||
)
|
||||
)
|
||||
(br_if $case14|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:120:9
|
||||
;;@ assembly/pson.ts:115:9
|
||||
(i32.const 254)
|
||||
)
|
||||
)
|
||||
(br_if $case15|0
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ assembly/pson.ts:124:9
|
||||
;;@ assembly/pson.ts:120:9
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(br $case16|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:56:11
|
||||
;;@ assembly/pson.ts:52:21
|
||||
(block
|
||||
;;@ assembly/pson.ts:53:11
|
||||
(call $assembly/pson/pson.onNull)
|
||||
;;@ assembly/pson.ts:57:6
|
||||
;;@ assembly/pson.ts:54:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:60:11
|
||||
)
|
||||
;;@ assembly/pson.ts:56:21
|
||||
(block
|
||||
;;@ assembly/pson.ts:57:11
|
||||
(call $assembly/pson/pson.onTrue)
|
||||
;;@ assembly/pson.ts:61:6
|
||||
;;@ assembly/pson.ts:58:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:64:11
|
||||
)
|
||||
;;@ assembly/pson.ts:60:22
|
||||
(block
|
||||
;;@ assembly/pson.ts:61:11
|
||||
(call $assembly/pson/pson.onFalse)
|
||||
;;@ assembly/pson.ts:65:6
|
||||
;;@ assembly/pson.ts:62:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:68:11
|
||||
)
|
||||
;;@ assembly/pson.ts:64:24
|
||||
(block
|
||||
;;@ assembly/pson.ts:65:11
|
||||
(call $assembly/pson/pson.onEObject)
|
||||
;;@ assembly/pson.ts:69:6
|
||||
;;@ assembly/pson.ts:66:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:72:11
|
||||
)
|
||||
;;@ assembly/pson.ts:68:23
|
||||
(block
|
||||
;;@ assembly/pson.ts:69:11
|
||||
(call $assembly/pson/pson.onEArray)
|
||||
;;@ assembly/pson.ts:73:6
|
||||
;;@ assembly/pson.ts:70:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:76:11
|
||||
)
|
||||
;;@ assembly/pson.ts:72:24
|
||||
(block
|
||||
;;@ assembly/pson.ts:73:11
|
||||
(call $assembly/pson/pson.onEString)
|
||||
;;@ assembly/pson.ts:77:6
|
||||
;;@ assembly/pson.ts:74:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:80:11
|
||||
)
|
||||
;;@ assembly/pson.ts:76:23
|
||||
(block
|
||||
;;@ assembly/pson.ts:77:11
|
||||
(call $assembly/pson/pson.onObject
|
||||
;;@ assembly/pson.ts:80:20
|
||||
;;@ assembly/pson.ts:77:20
|
||||
(tee_local $2
|
||||
;;@ assembly/pson.ts:80:27
|
||||
;;@ assembly/pson.ts:77:27
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:81:6
|
||||
;;@ assembly/pson.ts:78:6
|
||||
(block $break|1
|
||||
(loop $continue|1
|
||||
(if
|
||||
;;@ assembly/pson.ts:81:13
|
||||
;;@ assembly/pson.ts:78:13
|
||||
(block (result i32)
|
||||
(set_local $0
|
||||
(get_local $2)
|
||||
@ -459,9 +468,9 @@
|
||||
)
|
||||
(block
|
||||
(block
|
||||
;;@ assembly/pson.ts:82:8
|
||||
;;@ assembly/pson.ts:79:8
|
||||
(call $assembly/pson/decodeValue)
|
||||
;;@ assembly/pson.ts:83:8
|
||||
;;@ assembly/pson.ts:80:8
|
||||
(call $assembly/pson/decodeValue)
|
||||
)
|
||||
(br $continue|1)
|
||||
@ -469,22 +478,25 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:85:6
|
||||
;;@ assembly/pson.ts:82:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:88:11
|
||||
)
|
||||
;;@ assembly/pson.ts:84:22
|
||||
(block
|
||||
;;@ assembly/pson.ts:85:11
|
||||
(call $assembly/pson/pson.onArray
|
||||
;;@ assembly/pson.ts:88:19
|
||||
;;@ assembly/pson.ts:85:19
|
||||
(tee_local $2
|
||||
;;@ assembly/pson.ts:88:26
|
||||
;;@ assembly/pson.ts:85:26
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:89:6
|
||||
;;@ assembly/pson.ts:86:6
|
||||
(block $break|2
|
||||
(loop $continue|2
|
||||
(if
|
||||
;;@ assembly/pson.ts:89:13
|
||||
;;@ assembly/pson.ts:86:13
|
||||
(block (result i32)
|
||||
(set_local $0
|
||||
(get_local $2)
|
||||
@ -498,97 +510,126 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(block
|
||||
(block
|
||||
;;@ assembly/pson.ts:90:8
|
||||
;;@ assembly/pson.ts:86:21
|
||||
(call $assembly/pson/decodeValue)
|
||||
)
|
||||
(br $continue|2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:92:6
|
||||
;;@ assembly/pson.ts:87:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:95:11
|
||||
)
|
||||
;;@ assembly/pson.ts:89:24
|
||||
(block
|
||||
;;@ assembly/pson.ts:90:11
|
||||
(call $assembly/pson/pson.onInteger
|
||||
;;@ assembly/pson.ts:95:21
|
||||
;;@ assembly/pson.ts:90:21
|
||||
(i32.xor
|
||||
(i32.shr_u
|
||||
;;@ assembly/pson.ts:95:22
|
||||
;;@ assembly/pson.ts:90:22
|
||||
(tee_local $2
|
||||
;;@ assembly/pson.ts:95:30
|
||||
;;@ assembly/pson.ts:90:30
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
;;@ assembly/pson.ts:95:49
|
||||
;;@ assembly/pson.ts:90:49
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ assembly/pson.ts:95:54
|
||||
;;@ assembly/pson.ts:90:54
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
;;@ assembly/pson.ts:95:55
|
||||
;;@ assembly/pson.ts:90:55
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:95:56
|
||||
;;@ assembly/pson.ts:90:56
|
||||
(get_local $2)
|
||||
;;@ assembly/pson.ts:95:63
|
||||
;;@ assembly/pson.ts:90:63
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:91:6
|
||||
(br $break|0)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:93:21
|
||||
(block
|
||||
;;@ assembly/pson.ts:94:6
|
||||
(set_local $3
|
||||
;;@ assembly/pson.ts:94:13
|
||||
(i64.xor
|
||||
(i64.shr_u
|
||||
;;@ assembly/pson.ts:94:14
|
||||
(tee_local $3
|
||||
;;@ assembly/pson.ts:94:22
|
||||
(call $assembly/pson/readVarint64)
|
||||
)
|
||||
;;@ assembly/pson.ts:94:41
|
||||
(i64.const 1)
|
||||
)
|
||||
;;@ assembly/pson.ts:94:46
|
||||
(i64.sub
|
||||
(i64.const 0)
|
||||
;;@ assembly/pson.ts:94:47
|
||||
(i64.and
|
||||
;;@ assembly/pson.ts:94:48
|
||||
(get_local $3)
|
||||
;;@ assembly/pson.ts:94:55
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:95:11
|
||||
(call $assembly/pson/pson.onLong
|
||||
;;@ assembly/pson.ts:95:18
|
||||
(i32.wrap/i64
|
||||
(get_local $3)
|
||||
)
|
||||
;;@ assembly/pson.ts:95:29
|
||||
(i32.wrap/i64
|
||||
;;@ assembly/pson.ts:95:35
|
||||
(i64.shr_u
|
||||
(get_local $3)
|
||||
;;@ assembly/pson.ts:95:44
|
||||
(i64.const 32)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:96:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:99:6
|
||||
(set_local $3
|
||||
;;@ assembly/pson.ts:99:13
|
||||
(i64.xor
|
||||
(i64.shr_u
|
||||
;;@ assembly/pson.ts:99:14
|
||||
(tee_local $3
|
||||
;;@ assembly/pson.ts:99:22
|
||||
(call $assembly/pson/readVarint64)
|
||||
)
|
||||
;;@ assembly/pson.ts:99:41
|
||||
(i64.const 1)
|
||||
)
|
||||
;;@ assembly/pson.ts:99:46
|
||||
(i64.sub
|
||||
(i64.const 0)
|
||||
;;@ assembly/pson.ts:99:47
|
||||
(i64.and
|
||||
;;@ assembly/pson.ts:99:48
|
||||
(get_local $3)
|
||||
;;@ assembly/pson.ts:99:55
|
||||
(i64.const 1)
|
||||
;;@ assembly/pson.ts:98:22
|
||||
(block
|
||||
;;@ assembly/pson.ts:99:11
|
||||
(call $assembly/pson/pson.onFloat
|
||||
;;@ assembly/pson.ts:99:19
|
||||
(f32.load
|
||||
;;@ assembly/pson.ts:99:29
|
||||
(get_global $assembly/pson/offset)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:100:11
|
||||
(call $assembly/pson/pson.onLong
|
||||
;;@ assembly/pson.ts:100:18
|
||||
(i32.wrap/i64
|
||||
(get_local $3)
|
||||
)
|
||||
;;@ assembly/pson.ts:100:29
|
||||
(i32.wrap/i64
|
||||
;;@ assembly/pson.ts:100:35
|
||||
(i64.shr_u
|
||||
(get_local $3)
|
||||
;;@ assembly/pson.ts:100:44
|
||||
(i64.const 32)
|
||||
)
|
||||
;;@ assembly/pson.ts:100:6
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:100:16
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:101:6
|
||||
(br $break|0)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:103:23
|
||||
(block
|
||||
;;@ assembly/pson.ts:104:11
|
||||
(call $assembly/pson/pson.onFloat
|
||||
;;@ assembly/pson.ts:104:19
|
||||
(f32.load
|
||||
;;@ assembly/pson.ts:104:29
|
||||
(call $assembly/pson/pson.onDouble
|
||||
;;@ assembly/pson.ts:104:20
|
||||
(f64.load
|
||||
;;@ assembly/pson.ts:104:30
|
||||
(get_global $assembly/pson/offset)
|
||||
)
|
||||
)
|
||||
@ -597,120 +638,116 @@
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:105:16
|
||||
(i32.const 4)
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:106:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:109:11
|
||||
(call $assembly/pson/pson.onDouble
|
||||
;;@ assembly/pson.ts:109:20
|
||||
(f64.load
|
||||
;;@ assembly/pson.ts:109:30
|
||||
)
|
||||
;;@ assembly/pson.ts:108:23
|
||||
(block
|
||||
;;@ assembly/pson.ts:109:6
|
||||
(set_local $2
|
||||
;;@ assembly/pson.ts:109:13
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
;;@ assembly/pson.ts:110:11
|
||||
(call $assembly/pson/pson.onString
|
||||
;;@ assembly/pson.ts:110:20
|
||||
(get_global $assembly/pson/offset)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:110:6
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:110:16
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ assembly/pson.ts:110:28
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ assembly/pson.ts:111:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:114:6
|
||||
(set_local $2
|
||||
;;@ assembly/pson.ts:114:13
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
;;@ assembly/pson.ts:115:11
|
||||
(call $assembly/pson/pson.onString
|
||||
;;@ assembly/pson.ts:115:20
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:115:28
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ assembly/pson.ts:116:6
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:116:16
|
||||
;;@ assembly/pson.ts:111:16
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:112:6
|
||||
(br $break|0)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:115:27
|
||||
(block
|
||||
;;@ assembly/pson.ts:117:6
|
||||
(unreachable)
|
||||
;;@ assembly/pson.ts:118:6
|
||||
(br $break|0)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:122:6
|
||||
(unreachable)
|
||||
)
|
||||
;;@ assembly/pson.ts:125:6
|
||||
;;@ assembly/pson.ts:120:23
|
||||
(block
|
||||
;;@ assembly/pson.ts:121:6
|
||||
(set_local $2
|
||||
;;@ assembly/pson.ts:125:13
|
||||
;;@ assembly/pson.ts:121:13
|
||||
(call $assembly/pson/readVarint32)
|
||||
)
|
||||
;;@ assembly/pson.ts:126:11
|
||||
;;@ assembly/pson.ts:122:11
|
||||
(call $assembly/pson/pson.onBinary
|
||||
;;@ assembly/pson.ts:126:20
|
||||
;;@ assembly/pson.ts:122:20
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:126:28
|
||||
;;@ assembly/pson.ts:122:28
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ assembly/pson.ts:127:6
|
||||
;;@ assembly/pson.ts:123:6
|
||||
(set_global $assembly/pson/offset
|
||||
(i32.add
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:127:16
|
||||
;;@ assembly/pson.ts:123:16
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:128:6
|
||||
;;@ assembly/pson.ts:124:6
|
||||
(br $break|0)
|
||||
)
|
||||
;;@ assembly/pson.ts:131:6
|
||||
)
|
||||
;;@ assembly/pson.ts:126:13
|
||||
(block
|
||||
;;@ assembly/pson.ts:127:6
|
||||
(if
|
||||
;;@ assembly/pson.ts:131:10
|
||||
;;@ assembly/pson.ts:127:10
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
;;@ assembly/pson.ts:131:18
|
||||
;;@ assembly/pson.ts:127:18
|
||||
(i32.const 239)
|
||||
)
|
||||
;;@ assembly/pson.ts:132:8
|
||||
;;@ assembly/pson.ts:127:34
|
||||
(unreachable)
|
||||
)
|
||||
;;@ assembly/pson.ts:134:11
|
||||
;;@ assembly/pson.ts:128:11
|
||||
(call $assembly/pson/pson.onInteger
|
||||
;;@ assembly/pson.ts:134:21
|
||||
;;@ assembly/pson.ts:128:21
|
||||
(i32.xor
|
||||
(i32.shr_u
|
||||
;;@ assembly/pson.ts:134:22
|
||||
;;@ assembly/pson.ts:128:22
|
||||
(get_local $1)
|
||||
;;@ assembly/pson.ts:134:31
|
||||
;;@ assembly/pson.ts:128:31
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ assembly/pson.ts:134:36
|
||||
;;@ assembly/pson.ts:128:36
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
;;@ assembly/pson.ts:134:37
|
||||
;;@ assembly/pson.ts:128:37
|
||||
(i32.and
|
||||
;;@ assembly/pson.ts:134:38
|
||||
;;@ assembly/pson.ts:128:38
|
||||
(get_local $1)
|
||||
;;@ assembly/pson.ts:134:46
|
||||
;;@ assembly/pson.ts:128:46
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:135:6
|
||||
;;@ assembly/pson.ts:129:6
|
||||
(br $break|0)
|
||||
)
|
||||
)
|
||||
(func $assembly/pson/decode (; 18 ;) (type $iv) (param $0 i32)
|
||||
)
|
||||
(func $assembly/pson/decode (; 17 ;) (type $iv) (param $0 i32)
|
||||
;;@ assembly/pson.ts:42:2
|
||||
(set_global $assembly/pson/offset
|
||||
;;@ assembly/pson.ts:42:11
|
||||
@ -727,34 +764,23 @@
|
||||
(get_local $0)
|
||||
)
|
||||
(block
|
||||
(block
|
||||
;;@ assembly/pson.ts:44:4
|
||||
;;@ assembly/pson.ts:43:26
|
||||
(call $assembly/pson/decodeValue)
|
||||
)
|
||||
(br $continue|0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assembly/pson.ts:46:2
|
||||
;;@ assembly/pson.ts:44:2
|
||||
(if
|
||||
(i32.eqz
|
||||
;;@ assembly/pson.ts:46:9
|
||||
(i32.eq
|
||||
;;@ assembly/pson.ts:44:6
|
||||
(i32.ne
|
||||
(get_global $assembly/pson/offset)
|
||||
;;@ assembly/pson.ts:46:19
|
||||
;;@ assembly/pson.ts:44:16
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 46)
|
||||
(i32.const 2)
|
||||
)
|
||||
;;@ assembly/pson.ts:44:24
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
@ -39,7 +39,7 @@ var pson = {
|
||||
console.log("double: " + value);
|
||||
},
|
||||
onString: function(offset, length) {
|
||||
console.log("string(length=" + length + "): " + new Buffer(mem.slice(offset, offset + length)).toString());
|
||||
console.log("string(length=" + length + "): " + Buffer.from(mem.slice(offset, offset + length)).toString());
|
||||
},
|
||||
onBinary: function(offset, length) {
|
||||
console.log("binary(length=" + length + "): " + mem.slice(offset, offset + length));
|
||||
@ -47,7 +47,7 @@ var pson = {
|
||||
};
|
||||
|
||||
// Instantiate the module
|
||||
var mod = new WebAssembly.Module(fs.readFileSync(__dirname + "/pson.optimized.wasm"));
|
||||
var mod = new WebAssembly.Module(fs.readFileSync(__dirname + "/build/optimized.wasm"));
|
||||
var ins = new WebAssembly.Instance(mod, { pson: pson });
|
||||
var mem = new Uint8Array(ins.exports.memory.buffer);
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "npm run build:untouched && npm run build:optimized",
|
||||
"build:untouched": "asc assembly/pson.ts -b pson.untouched.wasm -t pson.untouched.wat --validate --sourceMap --measure",
|
||||
"build:optimized": "asc -O assembly/pson.ts -b pson.optimized.wasm -t pson.optimized.wat --validate --sourceMap --measure",
|
||||
"asbuild": "npm run asbuild:untouched && npm run asbuild:optimized",
|
||||
"asbuild:untouched": "asc assembly/pson.ts -b build/untouched.wasm -t build/untouched.wat --validate --sourceMap --measure",
|
||||
"asbuild:optimized": "asc -O assembly/pson.ts -b build/optimized.wasm -t build/optimized.wat --validate --sourceMap --measure",
|
||||
"test": "node tests"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
280
package-lock.json
generated
280
package-lock.json
generated
@ -4,6 +4,16 @@
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@mrmlnc/readdir-enhanced": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
|
||||
"integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"call-me-maybe": "^1.0.1",
|
||||
"glob-to-regexp": "^0.3.0"
|
||||
}
|
||||
},
|
||||
"@protobufjs/utf8": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
||||
@ -72,9 +82,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "9.6.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.6.tgz",
|
||||
"integrity": "sha512-SJe0g5cZeGNDP5sD8mIX3scb+eq8LQQZ60FXiKZHipYSeEFZ5EKml+NNMiO76F74TY4PoMWlNxF/YRY40FOvZQ==",
|
||||
"version": "10.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.0.4.tgz",
|
||||
"integrity": "sha512-RisaZmcmCLjRipAY7nVi3fmkIk4Z0JMn8YHdGF6qYMsIDpD0dfzz+3yy2dL5Q5aHWOnqPx51IRxkA44myknJvw==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/shelljs": {
|
||||
@ -115,9 +125,9 @@
|
||||
}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz",
|
||||
"integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=",
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz",
|
||||
"integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=",
|
||||
"dev": true
|
||||
},
|
||||
"align-text": {
|
||||
@ -191,9 +201,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"argparse": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
|
||||
"integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=",
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sprintf-js": "~1.0.2"
|
||||
@ -338,9 +348,9 @@
|
||||
}
|
||||
},
|
||||
"babel-core": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz",
|
||||
"integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=",
|
||||
"version": "6.26.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
|
||||
"integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.26.0",
|
||||
@ -353,15 +363,15 @@
|
||||
"babel-traverse": "^6.26.0",
|
||||
"babel-types": "^6.26.0",
|
||||
"babylon": "^6.18.0",
|
||||
"convert-source-map": "^1.5.0",
|
||||
"debug": "^2.6.8",
|
||||
"convert-source-map": "^1.5.1",
|
||||
"debug": "^2.6.9",
|
||||
"json5": "^0.5.1",
|
||||
"lodash": "^4.17.4",
|
||||
"minimatch": "^3.0.4",
|
||||
"path-is-absolute": "^1.0.1",
|
||||
"private": "^0.1.7",
|
||||
"private": "^0.1.8",
|
||||
"slash": "^1.0.0",
|
||||
"source-map": "^0.5.6"
|
||||
"source-map": "^0.5.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"babylon": {
|
||||
@ -828,9 +838,9 @@
|
||||
}
|
||||
},
|
||||
"babel-plugin-transform-es2015-modules-commonjs": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz",
|
||||
"integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=",
|
||||
"version": "6.26.2",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz",
|
||||
"integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-plugin-transform-strict-mode": "^6.24.1",
|
||||
@ -1257,9 +1267,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"binaryen": {
|
||||
"version": "46.0.0-nightly.20180427",
|
||||
"resolved": "https://registry.npmjs.org/binaryen/-/binaryen-46.0.0-nightly.20180427.tgz",
|
||||
"integrity": "sha512-pPG9B3c2n27udyDPkLrhTJcP0ut0fK56RLH/jWUcvAIUMJXgZY3hmxLZMuUiPc2+kERZroKNxpdMf3HRmf/UnQ=="
|
||||
"version": "47.0.0-nightly.20180503",
|
||||
"resolved": "https://registry.npmjs.org/binaryen/-/binaryen-47.0.0-nightly.20180503.tgz",
|
||||
"integrity": "sha512-kYOHR+3v9iFPHnsbBWXem5c+mYpgWEOvK52KcMa4Af87L1/u89/0A4itry2Y3NKLhiFxx1oIO+k7RDPKG3zV3g=="
|
||||
},
|
||||
"binaryextensions": {
|
||||
"version": "2.1.1",
|
||||
@ -1494,6 +1504,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"call-me-maybe": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
|
||||
"integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=",
|
||||
"dev": true
|
||||
},
|
||||
"camelcase": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
|
||||
@ -1767,9 +1783,9 @@
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
|
||||
},
|
||||
"colors": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.2.1.tgz",
|
||||
"integrity": "sha512-s8+wktIuDSLffCywiwSxQOMqtPxML11a/dtHE17tMn4B1MSWw/C22EKf7M2KGUBcDaVFEGT+S8N02geDXeuNKg==",
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.2.4.tgz",
|
||||
"integrity": "sha512-6Y+iBnWmXL+AWtlOp2Vr6R2w5MUlNJRwR0ShVFaAb1CqWzhPOpQg4L0jxD+xpw/Nc8QJwaq3KM79QUCriY8CWQ==",
|
||||
"dev": true
|
||||
},
|
||||
"commander": {
|
||||
@ -1998,9 +2014,9 @@
|
||||
}
|
||||
},
|
||||
"deep-extend": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz",
|
||||
"integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=",
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz",
|
||||
"integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==",
|
||||
"dev": true
|
||||
},
|
||||
"define-property": {
|
||||
@ -2085,6 +2101,16 @@
|
||||
"randombytes": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"dir-glob": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz",
|
||||
"integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arrify": "^1.0.1",
|
||||
"path-type": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"domain-browser": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
|
||||
@ -2098,9 +2124,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"duplexify": {
|
||||
"version": "3.5.4",
|
||||
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz",
|
||||
"integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==",
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz",
|
||||
"integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"end-of-stream": "^1.0.0",
|
||||
@ -2116,9 +2142,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"ejs": {
|
||||
"version": "2.5.9",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.9.tgz",
|
||||
"integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ==",
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz",
|
||||
"integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"elegant-spinner": {
|
||||
@ -2492,6 +2518,19 @@
|
||||
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
|
||||
"dev": true
|
||||
},
|
||||
"fast-glob": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.1.tgz",
|
||||
"integrity": "sha512-wSyW1TBK3ia5V+te0rGPXudeMHoUQW6O5Y9oATiaGhpENmEifPDlOdhpsnlj5HoG6ttIvGiY1DdCmI9X2xGMhg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@mrmlnc/readdir-enhanced": "^2.2.1",
|
||||
"glob-parent": "^3.1.0",
|
||||
"is-glob": "^4.0.0",
|
||||
"merge2": "^1.2.1",
|
||||
"micromatch": "^3.1.10"
|
||||
}
|
||||
},
|
||||
"fast-json-stable-stringify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
||||
@ -2566,9 +2605,9 @@
|
||||
}
|
||||
},
|
||||
"flow-parser": {
|
||||
"version": "0.70.0",
|
||||
"resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.70.0.tgz",
|
||||
"integrity": "sha512-gGdyVUZWswG5jcINrVDHd3RY4nJptBTAx9mR9thGsrGGmAUR7omgJXQSpR+fXrLtxSTAea3HpAZNU/yzRJc2Cg==",
|
||||
"version": "0.71.0",
|
||||
"resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.71.0.tgz",
|
||||
"integrity": "sha512-rXSvqSBLf8aRI6T3P99jMcUYvZoO1KZcKDkzGJmXvYdNAgRKu7sfGNtxEsn3cX4TgungBuJpX+K8aHRC9/B5MA==",
|
||||
"dev": true
|
||||
},
|
||||
"flush-write-stream": {
|
||||
@ -2644,9 +2683,9 @@
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.2.tgz",
|
||||
"integrity": "sha512-iownA+hC4uHFp+7gwP/y5SzaiUo7m2vpa0dhpzw8YuKtiZsz7cIXsFbXpLEeBM6WuCQyw1MH4RRe6XI8GFUctQ==",
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz",
|
||||
"integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
@ -3360,6 +3399,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"glob-to-regexp": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz",
|
||||
"integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=",
|
||||
"dev": true
|
||||
},
|
||||
"global-modules": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
|
||||
@ -3412,9 +3457,9 @@
|
||||
}
|
||||
},
|
||||
"got": {
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/got/-/got-8.3.0.tgz",
|
||||
"integrity": "sha512-kBNy/S2CGwrYgDSec5KTWGKUvupwkkTVAjIsVFF2shXO13xpZdFP4d4kxa//CLX2tN/rV0aYwK8vY6UKWGn2vQ==",
|
||||
"version": "8.3.1",
|
||||
"resolved": "https://registry.npmjs.org/got/-/got-8.3.1.tgz",
|
||||
"integrity": "sha512-tiLX+bnYm5A56T5N/n9Xo89vMaO1mrS9qoDqj3u/anVooqGozvY/HbXzEpDfbNeKsHCBpK40gSbz8wGYSp3i1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@sindresorhus/is": "^0.7.0",
|
||||
@ -3696,6 +3741,12 @@
|
||||
"integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=",
|
||||
"dev": true
|
||||
},
|
||||
"ignore": {
|
||||
"version": "3.3.8",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz",
|
||||
"integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==",
|
||||
"dev": true
|
||||
},
|
||||
"import-local": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz",
|
||||
@ -4088,6 +4139,12 @@
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||
"dev": true
|
||||
},
|
||||
"isbinaryfile": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz",
|
||||
"integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=",
|
||||
"dev": true
|
||||
},
|
||||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
@ -4128,9 +4185,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.10.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz",
|
||||
"integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==",
|
||||
"version": "3.11.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz",
|
||||
"integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
@ -4740,16 +4797,17 @@
|
||||
}
|
||||
},
|
||||
"mem-fs-editor": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-3.0.2.tgz",
|
||||
"integrity": "sha1-3Qpuryu4prN3QAZ6pUnrUwEFr58=",
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-4.0.1.tgz",
|
||||
"integrity": "sha512-54fptqhSZX1sSYsVVInG2qzUWPPrEv/6qYxHAwXJZQfzDcviJcL+7p/wmupg8SdAOi42m/vilMBemx3D6Sz22g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commondir": "^1.0.1",
|
||||
"deep-extend": "^0.4.0",
|
||||
"ejs": "^2.3.1",
|
||||
"deep-extend": "^0.5.1",
|
||||
"ejs": "^2.5.9",
|
||||
"glob": "^7.0.3",
|
||||
"globby": "^6.1.0",
|
||||
"globby": "^8.0.0",
|
||||
"isbinaryfile": "^3.0.2",
|
||||
"mkdirp": "^0.5.0",
|
||||
"multimatch": "^2.0.0",
|
||||
"rimraf": "^2.2.8",
|
||||
@ -4758,9 +4816,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"clone": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
|
||||
"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz",
|
||||
"integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=",
|
||||
"dev": true
|
||||
},
|
||||
"clone-stats": {
|
||||
@ -4769,6 +4827,21 @@
|
||||
"integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=",
|
||||
"dev": true
|
||||
},
|
||||
"globby": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz",
|
||||
"integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-union": "^1.0.1",
|
||||
"dir-glob": "^2.0.0",
|
||||
"fast-glob": "^2.0.2",
|
||||
"glob": "^7.1.2",
|
||||
"ignore": "^3.3.5",
|
||||
"pify": "^3.0.0",
|
||||
"slash": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"replace-ext": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
|
||||
@ -4801,6 +4874,12 @@
|
||||
"readable-stream": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"merge2": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz",
|
||||
"integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==",
|
||||
"dev": true
|
||||
},
|
||||
"micromatch": {
|
||||
"version": "3.1.10",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
|
||||
@ -5662,12 +5741,12 @@
|
||||
}
|
||||
},
|
||||
"pumpify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz",
|
||||
"integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==",
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.0.tgz",
|
||||
"integrity": "sha512-UWi0klDoq8xtVzlMRgENV9F7iCTZExaJQSQL187UXsxpk9NnrKGqTqqUNYAKGOzucSOxs2+jUnRNI+rLviPhJg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"duplexify": "^3.5.3",
|
||||
"duplexify": "^3.6.0",
|
||||
"inherits": "^2.0.3",
|
||||
"pump": "^2.0.0"
|
||||
}
|
||||
@ -6751,9 +6830,9 @@
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-5.0.1.tgz",
|
||||
"integrity": "sha512-XK7QmDcNHVmZkVtkiwNDWiERRHPyU8nBqZB1+iv2UhOG0q3RQ9HsZ2CMqISlFbxjrYFGfG2mX7bW4dAyxBVzUw==",
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-6.0.2.tgz",
|
||||
"integrity": "sha512-H/KWK27B3JJAc5WFOBBUxN638DukbV8PptdQgiHWPO2SGDVJzuVOl8Ye0XJ5+FiZIdFtgUuGOJRV4c/XBQ5dBg==",
|
||||
"requires": {
|
||||
"arrify": "^1.0.0",
|
||||
"chalk": "^2.3.0",
|
||||
@ -6766,15 +6845,15 @@
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz",
|
||||
"integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=",
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz",
|
||||
"integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==",
|
||||
"dev": true
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.9.1",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz",
|
||||
"integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=",
|
||||
"version": "5.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.10.0.tgz",
|
||||
"integrity": "sha1-EeJrzLiK+gLdDZlWyuPUVAtfVMM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.22.0",
|
||||
@ -6792,9 +6871,9 @@
|
||||
}
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "2.16.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.16.0.tgz",
|
||||
"integrity": "sha512-9Ier/60O7OZRNPiw+or5QAtAY4kQA+WDiO/r6xOYATEyefH9bdfvTRLCxrYnFhQlZfET2vYXKfpr3Vw2BiArZw==",
|
||||
"version": "2.26.2",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.26.2.tgz",
|
||||
"integrity": "sha512-uzwnhmrSbyinPCiwfzGsOY3IulBTwoky7r83HmZdz9QNCjhSCzavkh47KLWuU0zF2F2WbpmmzoJUIEiYyd+jEQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
@ -7008,9 +7087,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"upath": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz",
|
||||
"integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==",
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/upath/-/upath-1.0.5.tgz",
|
||||
"integrity": "sha512-qbKn90aDQ0YEwvXoLqj0oiuUYroLX2lVHZ+b+xwjozFasAOC4GneDq5+OaIG5Zj+jFmbz/uO+f7a9qxjktJQww==",
|
||||
"dev": true
|
||||
},
|
||||
"uri-js": {
|
||||
@ -7152,9 +7231,9 @@
|
||||
}
|
||||
},
|
||||
"watchpack": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz",
|
||||
"integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==",
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",
|
||||
"integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chokidar": "^2.0.2",
|
||||
@ -7163,9 +7242,9 @@
|
||||
}
|
||||
},
|
||||
"webpack": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.6.0.tgz",
|
||||
"integrity": "sha512-Fu/k/3fZeGtIhuFkiYpIy1UDHhMiGKjG4FFPVuvG+5Os2lWA1ttWpmi9Qnn6AgfZqj9MvhZW/rmj/ip+nHr06g==",
|
||||
"version": "4.7.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.7.0.tgz",
|
||||
"integrity": "sha512-OXOAip9mjy0ahFYCXu6LLNzTiIQzd2UOHkNHANc/dyxf8CYCgcJ5UKsTXfbfeJb4tqkKb6B1FIQ9Xtl6gftb8Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"acorn": "^5.0.0",
|
||||
@ -7338,9 +7417,9 @@
|
||||
}
|
||||
},
|
||||
"webpack-cli": {
|
||||
"version": "2.0.15",
|
||||
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-2.0.15.tgz",
|
||||
"integrity": "sha512-bjNeIUO51D4OsmZ5ufzcpzVoacjxfWNfeBZKYL3jc+EMfCME3TyfdCPSUoKiOnebQChfupQuIRpAnx7L4l3Hew==",
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-2.1.2.tgz",
|
||||
"integrity": "sha512-2C6bs9gORlzCSgkNZTnj8hnXMxe3g2v+yqiUdB+1l/I3sI36ND4zZStV00yq0eGjE5CNu0eqOQr7YYe+42H2Yw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^2.3.2",
|
||||
@ -7368,7 +7447,7 @@
|
||||
"webpack-addons": "^1.1.5",
|
||||
"yargs": "^11.1.0",
|
||||
"yeoman-environment": "^2.0.0",
|
||||
"yeoman-generator": "^2.0.3"
|
||||
"yeoman-generator": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"webpack-sources": {
|
||||
@ -7591,26 +7670,26 @@
|
||||
}
|
||||
},
|
||||
"yeoman-generator": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-2.0.4.tgz",
|
||||
"integrity": "sha512-Sgvz3MAkOpEIobcpW3rjEl6bOTNnl8SkibP9z7hYKfIGIlw0QDC2k0MAeXvyE2pLqc2M0Duql+6R7/W9GrJojg==",
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-2.0.5.tgz",
|
||||
"integrity": "sha512-rV6tJ8oYzm4mmdF2T3wjY+Q42jKF2YiiD0VKfJ8/0ZYwmhCKC9Xs2346HVLPj/xE13i68psnFJv7iS6gWRkeAg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^2.6.0",
|
||||
"chalk": "^2.3.0",
|
||||
"cli-table": "^0.3.1",
|
||||
"cross-spawn": "^5.1.0",
|
||||
"cross-spawn": "^6.0.5",
|
||||
"dargs": "^5.1.0",
|
||||
"dateformat": "^3.0.2",
|
||||
"dateformat": "^3.0.3",
|
||||
"debug": "^3.1.0",
|
||||
"detect-conflict": "^1.0.0",
|
||||
"error": "^7.0.2",
|
||||
"find-up": "^2.1.0",
|
||||
"github-username": "^4.0.0",
|
||||
"istextorbinary": "^2.1.0",
|
||||
"lodash": "^4.17.4",
|
||||
"istextorbinary": "^2.2.1",
|
||||
"lodash": "^4.17.10",
|
||||
"make-dir": "^1.1.0",
|
||||
"mem-fs-editor": "^3.0.2",
|
||||
"mem-fs-editor": "^4.0.0",
|
||||
"minimist": "^1.2.0",
|
||||
"pretty-bytes": "^4.0.2",
|
||||
"read-chunk": "^2.1.0",
|
||||
@ -7632,17 +7711,6 @@
|
||||
"lodash": "^4.14.0"
|
||||
}
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
|
||||
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "^4.0.1",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
@ -7651,6 +7719,12 @@
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.10",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
|
||||
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
12
package.json
12
package.json
@ -12,25 +12,25 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@protobufjs/utf8": "^1.1.0",
|
||||
"binaryen": "46.0.0-nightly.20180427",
|
||||
"binaryen": "47.0.0-nightly.20180503",
|
||||
"glob": "^7.1.2",
|
||||
"long": "^4.0.0",
|
||||
"minimist": "^1.2.0",
|
||||
"ts-node": "^5.0.1"
|
||||
"ts-node": "^6.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^9.6.6",
|
||||
"@types/node": "^10.0.4",
|
||||
"browser-process-hrtime": "^0.1.2",
|
||||
"chalk": "^2.4.1",
|
||||
"diff": "^3.5.0",
|
||||
"source-map-support": "^0.5.5",
|
||||
"ts-loader": "^4.2.0",
|
||||
"tslint": "^5.9.1",
|
||||
"tslint": "^5.10.0",
|
||||
"typedoc": "^0.11.1",
|
||||
"typedoc-plugin-external-module-name": "^1.1.1",
|
||||
"typescript": "^2.8.3",
|
||||
"webpack": "^4.6.0",
|
||||
"webpack-cli": "^2.0.15"
|
||||
"webpack": "^4.7.0",
|
||||
"webpack-cli": "^2.1.2"
|
||||
},
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
|
@ -439,6 +439,7 @@
|
||||
(tee_local $1
|
||||
(i32.load
|
||||
(i32.sub
|
||||
;;@ ~lib/allocator/tlsf.ts:211:31
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
@ -494,14 +495,13 @@
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
;;@ ~lib/allocator/tlsf.ts:222:24
|
||||
(get_local $4)
|
||||
(i32.const 4)
|
||||
)
|
||||
(tee_local $3
|
||||
;;@ ~lib/allocator/tlsf.ts:222:17
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
;;@ ~lib/allocator/tlsf.ts:240:4
|
||||
(set_local $4
|
||||
;;@ ~lib/allocator/tlsf.ts:240:20
|
||||
@ -901,6 +901,7 @@
|
||||
;;@ ~lib/allocator/tlsf.ts:327:26
|
||||
(get_local $2)
|
||||
(i32.ctz
|
||||
;;@ ~lib/allocator/tlsf.ts:327:39
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
@ -937,6 +938,7 @@
|
||||
;;@ ~lib/allocator/tlsf.ts:322:8
|
||||
(tee_local $2
|
||||
(i32.ctz
|
||||
;;@ ~lib/allocator/tlsf.ts:322:24
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
@ -949,6 +951,7 @@
|
||||
;;@ ~lib/allocator/tlsf.ts:324:28
|
||||
(get_local $2)
|
||||
(i32.ctz
|
||||
;;@ ~lib/allocator/tlsf.ts:324:41
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
|
@ -1907,7 +1907,6 @@
|
||||
(set_local $5
|
||||
;;@ ~lib/allocator/tlsf.ts:323:16
|
||||
(if (result i32)
|
||||
(i32.eqz
|
||||
(tee_local $7
|
||||
;;@ ~lib/allocator/tlsf.ts:323:28
|
||||
(call $~lib/allocator/tlsf/Root#getSLMap
|
||||
@ -1917,7 +1916,7 @@
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $7)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
@ -1927,7 +1926,6 @@
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
;;@ ~lib/allocator/tlsf.ts:324:8
|
||||
|
Loading…
x
Reference in New Issue
Block a user