porffor 0.19.8 → 0.19.10
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/compiler/builtins/symbol.ts +10 -0
- package/compiler/codegen.js +343 -269
- package/compiler/generated_builtins.js +526 -519
- package/compiler/precompile.js +71 -36
- package/compiler/wrap.js +9 -5
- package/package.json +1 -1
- package/runner/index.js +1 -1
@@ -62,4 +62,14 @@ export const __Symbol_prototype_toLocaleString = (_this: Symbol) => __Symbol_pro
|
|
62
62
|
|
63
63
|
export const __Symbol_prototype_valueOf = (_this: Symbol) => {
|
64
64
|
return _this;
|
65
|
+
};
|
66
|
+
|
67
|
+
const forStore = new Map();
|
68
|
+
export const __Symbol_for = (key: any): Symbol => {
|
69
|
+
if (forStore.has(key)) return forStore.get(key);
|
70
|
+
|
71
|
+
const out: Symbol = Symbol(key);
|
72
|
+
forStore.set(key, out);
|
73
|
+
|
74
|
+
return out;
|
65
75
|
};
|