json-as 0.5.59 → 0.5.60

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-as",
3
- "version": "0.5.59",
3
+ "version": "0.5.60",
4
4
  "description": "JSON encoder/decoder for AssemblyScript",
5
5
  "types": "assembly/index.ts",
6
6
  "author": "Jairus Tanaka",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-as/transform",
3
- "version": "0.5.59",
3
+ "version": "0.5.60",
4
4
  "description": "JSON encoder/decoder for AssemblyScript",
5
5
  "main": "./lib/index.js",
6
6
  "author": "Jairus Tanaka",
@@ -174,8 +174,10 @@ class AsJSONTransform extends BaseVisitor {
174
174
  `;
175
175
  }
176
176
 
177
+ // Odd behavior here... When pairing this transform with asyncify, having @inline on __JSON_Set_Key<T> with a generic will cause it to freeze.
178
+ // Binaryen cannot predict and add/mangle code when it is genericed.
177
179
  const setKeyFunc = `
178
- @inline __JSON_Set_Key<T>(key: T, data: string, val_start: i32, val_end: i32): void {
180
+ __JSON_Set_Key<T>(key: T, data: string, val_start: i32, val_end: i32): void {
179
181
  ${
180
182
  // @ts-ignore
181
183
  this.currentClass.setDataStmts.join("")