toilscript 0.0.1 → 0.1.1

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.
Files changed (121) hide show
  1. package/LICENSE +201 -201
  2. package/NOTICE +94 -94
  3. package/README.md +101 -114
  4. package/bin/asc.js +0 -0
  5. package/bin/asinit.js +6 -6
  6. package/dist/asc.generated.d.ts +10027 -0
  7. package/dist/asc.js +24474 -0
  8. package/dist/asc.js.map +7 -0
  9. package/dist/importmap.json +9 -0
  10. package/dist/toilscript.generated.d.ts +11242 -0
  11. package/dist/toilscript.js +337 -0
  12. package/dist/toilscript.js.map +7 -0
  13. package/dist/web.js +22 -0
  14. package/lib/binaryen.d.ts +2 -2
  15. package/lib/binaryen.js +2 -2
  16. package/package.json +115 -114
  17. package/std/README.md +6 -6
  18. package/std/assembly/array.ts +550 -550
  19. package/std/assembly/arraybuffer.ts +77 -77
  20. package/std/assembly/atomics.ts +127 -127
  21. package/std/assembly/bindings/asyncify.ts +16 -16
  22. package/std/assembly/bindings/dom.ts +291 -291
  23. package/std/assembly/bindings/node.ts +6 -6
  24. package/std/assembly/bitflags.ts +53 -53
  25. package/std/assembly/builtins.ts +2650 -2650
  26. package/std/assembly/byteslice.ts +177 -177
  27. package/std/assembly/compat.ts +2 -2
  28. package/std/assembly/console.ts +42 -42
  29. package/std/assembly/crypto.ts +9 -9
  30. package/std/assembly/dataview.ts +181 -181
  31. package/std/assembly/date.ts +375 -375
  32. package/std/assembly/diagnostics.ts +11 -11
  33. package/std/assembly/encoding.ts +151 -151
  34. package/std/assembly/endian.ts +45 -45
  35. package/std/assembly/error.ts +44 -44
  36. package/std/assembly/fixedarray.ts +173 -173
  37. package/std/assembly/fixedmap.ts +326 -326
  38. package/std/assembly/fixedset.ts +275 -275
  39. package/std/assembly/function.ts +42 -42
  40. package/std/assembly/index.d.ts +2892 -2891
  41. package/std/assembly/iterator.ts +35 -35
  42. package/std/assembly/map.ts +269 -269
  43. package/std/assembly/math.ts +3289 -3289
  44. package/std/assembly/memory.ts +123 -123
  45. package/std/assembly/number.ts +388 -388
  46. package/std/assembly/object.ts +36 -36
  47. package/std/assembly/performance.ts +9 -9
  48. package/std/assembly/pointer.ts +80 -80
  49. package/std/assembly/polyfills.ts +27 -27
  50. package/std/assembly/process.ts +50 -50
  51. package/std/assembly/reference.ts +48 -48
  52. package/std/assembly/regexp.ts +12 -12
  53. package/std/assembly/rt/README.md +83 -83
  54. package/std/assembly/rt/common.ts +81 -81
  55. package/std/assembly/rt/index-incremental.ts +2 -2
  56. package/std/assembly/rt/index-memory.ts +1 -1
  57. package/std/assembly/rt/index-minimal.ts +2 -2
  58. package/std/assembly/rt/index-stub.ts +1 -1
  59. package/std/assembly/rt/index.d.ts +37 -37
  60. package/std/assembly/rt/itcms.ts +419 -419
  61. package/std/assembly/rt/memory-runtime.ts +94 -94
  62. package/std/assembly/rt/rtrace.ts +15 -15
  63. package/std/assembly/rt/stub.ts +133 -133
  64. package/std/assembly/rt/tcms.ts +254 -254
  65. package/std/assembly/rt/tlsf.ts +592 -592
  66. package/std/assembly/rt.ts +90 -90
  67. package/std/assembly/set.ts +225 -225
  68. package/std/assembly/shared/feature.ts +68 -68
  69. package/std/assembly/shared/runtime.ts +13 -13
  70. package/std/assembly/shared/target.ts +11 -11
  71. package/std/assembly/shared/tsconfig.json +11 -11
  72. package/std/assembly/shared/typeinfo.ts +72 -72
  73. package/std/assembly/staticarray.ts +423 -423
  74. package/std/assembly/string.ts +850 -850
  75. package/std/assembly/symbol.ts +114 -114
  76. package/std/assembly/table.ts +16 -16
  77. package/std/assembly/toilscript.ts +16 -0
  78. package/std/assembly/tsconfig.json +6 -6
  79. package/std/assembly/typedarray.ts +1954 -1954
  80. package/std/assembly/uri.ts +17 -17
  81. package/std/assembly/util/bytes.ts +107 -107
  82. package/std/assembly/util/casemap.ts +497 -497
  83. package/std/assembly/util/error.ts +58 -58
  84. package/std/assembly/util/hash.ts +117 -117
  85. package/std/assembly/util/math.ts +1922 -1922
  86. package/std/assembly/util/memory.ts +290 -290
  87. package/std/assembly/util/number.ts +873 -873
  88. package/std/assembly/util/sort.ts +313 -313
  89. package/std/assembly/util/string.ts +1202 -1202
  90. package/std/assembly/util/uri.ts +275 -275
  91. package/std/assembly/vector.ts +4 -4
  92. package/std/assembly.json +16 -16
  93. package/std/portable/index.d.ts +461 -461
  94. package/std/portable/index.js +416 -416
  95. package/std/portable.json +11 -11
  96. package/std/types/assembly/index.d.ts +1 -1
  97. package/std/types/assembly/package.json +2 -2
  98. package/std/types/portable/index.d.ts +1 -1
  99. package/std/types/portable/package.json +2 -2
  100. package/tsconfig-base.json +13 -13
  101. package/util/README.md +23 -23
  102. package/util/browser/fs.js +1 -1
  103. package/util/browser/module.js +5 -5
  104. package/util/browser/path.js +520 -520
  105. package/util/browser/process.js +59 -59
  106. package/util/browser/url.js +23 -23
  107. package/util/cpu.d.ts +9 -9
  108. package/util/cpu.js +42 -42
  109. package/util/find.d.ts +6 -6
  110. package/util/find.js +20 -20
  111. package/util/node.d.ts +21 -21
  112. package/util/node.js +34 -34
  113. package/util/options.d.ts +70 -70
  114. package/util/options.js +262 -262
  115. package/util/terminal.d.ts +52 -52
  116. package/util/terminal.js +35 -35
  117. package/util/text.d.ts +26 -26
  118. package/util/text.js +114 -114
  119. package/util/tsconfig.json +9 -9
  120. package/util/web.d.ts +11 -11
  121. package/util/web.js +33 -33
@@ -1,36 +1,36 @@
1
- export abstract class Object {
2
- static is<T>(x: T, y: T): bool {
3
- if (isFloat<T>()) {
4
- // Float pointing is special we shoulr presere following identities:
5
- // 0.0 !=-0.0
6
- // NaN == NaN
7
- if (sizeof<T>() == 8) {
8
- return (
9
- bool(u32(x != x) & u32(y != y) |
10
- u32(reinterpret<u64>(f64(x)) == reinterpret<u64>(f64(y))))
11
- );
12
- } else {
13
- return (
14
- bool(u32(x != x) & u32(y != y) |
15
- u32(reinterpret<u32>(f32(x)) == reinterpret<u32>(f32(y))))
16
- );
17
- }
18
- }
19
- // For references, strings, integers and booleans
20
- return x == y;
21
- }
22
-
23
- // TODO: Wrapper classes like `Function<T>` override the `this` type of
24
- // `toString`, which is covariant and hence fails to overload. Wrapper classes
25
- // might need a different mechanism to indicate such special `this` types.
26
- // toString(): string {
27
- // return "[object Object]";
28
- // }
29
- }
30
-
31
- // TODO: The types `Object` and `object` differ in TypeScript, in that the
32
- // latter indicates any non-primitive type, not including `string` for example.
33
- // The `object` type hence remains reserved for now, also to potentially address
34
- // the above `toString` TODO in alternative ways.
35
- // @ts-ignore: nolib
36
- // export type object = Object;
1
+ export abstract class Object {
2
+ static is<T>(x: T, y: T): bool {
3
+ if (isFloat<T>()) {
4
+ // Float pointing is special we shoulr presere following identities:
5
+ // 0.0 !=-0.0
6
+ // NaN == NaN
7
+ if (sizeof<T>() == 8) {
8
+ return (
9
+ bool(u32(x != x) & u32(y != y) |
10
+ u32(reinterpret<u64>(f64(x)) == reinterpret<u64>(f64(y))))
11
+ );
12
+ } else {
13
+ return (
14
+ bool(u32(x != x) & u32(y != y) |
15
+ u32(reinterpret<u32>(f32(x)) == reinterpret<u32>(f32(y))))
16
+ );
17
+ }
18
+ }
19
+ // For references, strings, integers and booleans
20
+ return x == y;
21
+ }
22
+
23
+ // TODO: Wrapper classes like `Function<T>` override the `this` type of
24
+ // `toString`, which is covariant and hence fails to overload. Wrapper classes
25
+ // might need a different mechanism to indicate such special `this` types.
26
+ // toString(): string {
27
+ // return "[object Object]";
28
+ // }
29
+ }
30
+
31
+ // TODO: The types `Object` and `object` differ in TypeScript, in that the
32
+ // latter indicates any non-primitive type, not including `string` for example.
33
+ // The `object` type hence remains reserved for now, also to potentially address
34
+ // the above `toString` TODO in alternative ways.
35
+ // @ts-ignore: nolib
36
+ // export type object = Object;
@@ -1,9 +1,9 @@
1
- import {
2
- performance as performance_binding
3
- } from "bindings/dom";
4
-
5
- export namespace performance {
6
- export function now(): f64 {
7
- return performance_binding.now();
8
- }
9
- }
1
+ import {
2
+ performance as performance_binding
3
+ } from "bindings/dom";
4
+
5
+ export namespace performance {
6
+ export function now(): f64 {
7
+ return performance_binding.now();
8
+ }
9
+ }
@@ -1,80 +1,80 @@
1
- // Zero-overhead typed pointer. @unmanaged + changetype = no allocation, no GC.
2
- // Promoted from tests/compiler/std/pointer.ts experiment.
3
-
4
- @final @unmanaged
5
- export class Pointer<T> {
6
-
7
- @inline constructor(offset: usize = 0) {
8
- return changetype<Pointer<T>>(offset);
9
- }
10
-
11
- @inline get offset(): usize {
12
- return changetype<usize>(this);
13
- }
14
-
15
- @inline get value(): T {
16
- if (isReference<T>()) {
17
- return changetype<T>(changetype<usize>(this));
18
- } else {
19
- return load<T>(changetype<usize>(this));
20
- }
21
- }
22
-
23
- @inline set value(value: T) {
24
- if (isReference<T>()) {
25
- if (isManaged<T>()) ERROR("Unsafe unmanaged set of a managed object");
26
- if (value == null) {
27
- memory.fill(changetype<usize>(this), 0, offsetof<T>());
28
- } else {
29
- memory.copy(changetype<usize>(this), changetype<usize>(value), offsetof<T>());
30
- }
31
- } else {
32
- store<T>(changetype<usize>(this), value);
33
- }
34
- }
35
-
36
- @inline @operator("+") add(other: Pointer<T>): Pointer<T> {
37
- return changetype<Pointer<T>>(changetype<usize>(this) + changetype<usize>(other));
38
- }
39
-
40
- @inline @operator("-") sub(other: Pointer<T>): Pointer<T> {
41
- return changetype<Pointer<T>>(changetype<usize>(this) - changetype<usize>(other));
42
- }
43
-
44
- @inline @operator.prefix("++") inc(): Pointer<T> {
45
- const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
46
- return changetype<Pointer<T>>(changetype<usize>(this) + size);
47
- }
48
-
49
- @inline @operator.prefix("--") dec(): Pointer<T> {
50
- const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
51
- return changetype<Pointer<T>>(changetype<usize>(this) - size);
52
- }
53
-
54
- @inline @operator("[]") get(index: i32): T {
55
- const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
56
- return load<T>(changetype<usize>(this) + (<usize>index * size));
57
- }
58
-
59
- @inline @operator("[]=") set(index: i32, value: T): void {
60
- const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
61
- store<T>(changetype<usize>(this) + (<usize>index * size), value);
62
- }
63
-
64
- @inline isNull(): bool {
65
- return changetype<usize>(this) == 0;
66
- }
67
-
68
- @inline equals(other: Pointer<T>): bool {
69
- return changetype<usize>(this) == changetype<usize>(other);
70
- }
71
-
72
- @inline copyTo(dst: Pointer<T>, count: i32): void {
73
- const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
74
- memory.copy(changetype<usize>(dst), changetype<usize>(this), <usize>count * size);
75
- }
76
-
77
- @inline static null<T>(): Pointer<T> {
78
- return changetype<Pointer<T>>(0);
79
- }
80
- }
1
+ // Zero-overhead typed pointer. @unmanaged + changetype = no allocation, no GC.
2
+ // Promoted from tests/compiler/std/pointer.ts experiment.
3
+
4
+ @final @unmanaged
5
+ export class Pointer<T> {
6
+
7
+ @inline constructor(offset: usize = 0) {
8
+ return changetype<Pointer<T>>(offset);
9
+ }
10
+
11
+ @inline get offset(): usize {
12
+ return changetype<usize>(this);
13
+ }
14
+
15
+ @inline get value(): T {
16
+ if (isReference<T>()) {
17
+ return changetype<T>(changetype<usize>(this));
18
+ } else {
19
+ return load<T>(changetype<usize>(this));
20
+ }
21
+ }
22
+
23
+ @inline set value(value: T) {
24
+ if (isReference<T>()) {
25
+ if (isManaged<T>()) ERROR("Unsafe unmanaged set of a managed object");
26
+ if (value == null) {
27
+ memory.fill(changetype<usize>(this), 0, offsetof<T>());
28
+ } else {
29
+ memory.copy(changetype<usize>(this), changetype<usize>(value), offsetof<T>());
30
+ }
31
+ } else {
32
+ store<T>(changetype<usize>(this), value);
33
+ }
34
+ }
35
+
36
+ @inline @operator("+") add(other: Pointer<T>): Pointer<T> {
37
+ return changetype<Pointer<T>>(changetype<usize>(this) + changetype<usize>(other));
38
+ }
39
+
40
+ @inline @operator("-") sub(other: Pointer<T>): Pointer<T> {
41
+ return changetype<Pointer<T>>(changetype<usize>(this) - changetype<usize>(other));
42
+ }
43
+
44
+ @inline @operator.prefix("++") inc(): Pointer<T> {
45
+ const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
46
+ return changetype<Pointer<T>>(changetype<usize>(this) + size);
47
+ }
48
+
49
+ @inline @operator.prefix("--") dec(): Pointer<T> {
50
+ const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
51
+ return changetype<Pointer<T>>(changetype<usize>(this) - size);
52
+ }
53
+
54
+ @inline @operator("[]") get(index: i32): T {
55
+ const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
56
+ return load<T>(changetype<usize>(this) + (<usize>index * size));
57
+ }
58
+
59
+ @inline @operator("[]=") set(index: i32, value: T): void {
60
+ const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
61
+ store<T>(changetype<usize>(this) + (<usize>index * size), value);
62
+ }
63
+
64
+ @inline isNull(): bool {
65
+ return changetype<usize>(this) == 0;
66
+ }
67
+
68
+ @inline equals(other: Pointer<T>): bool {
69
+ return changetype<usize>(this) == changetype<usize>(other);
70
+ }
71
+
72
+ @inline copyTo(dst: Pointer<T>, count: i32): void {
73
+ const size = isReference<T>() ? offsetof<T>() : sizeof<T>();
74
+ memory.copy(changetype<usize>(dst), changetype<usize>(this), <usize>count * size);
75
+ }
76
+
77
+ @inline static null<T>(): Pointer<T> {
78
+ return changetype<Pointer<T>>(0);
79
+ }
80
+ }
@@ -1,27 +1,27 @@
1
- export function bswap<T extends number>(value: T): T {
2
- if (isInteger<T>()) {
3
- if (sizeof<T>() == 1) {
4
- return value;
5
- }
6
- if (sizeof<T>() == 2) {
7
- return <T>(<u16>value << 8 | (<u16>value >> 8));
8
- }
9
- if (sizeof<T>() == 4) {
10
- return <T>(
11
- rotl(<u32>value & 0xFF00FF00, 8) |
12
- rotr(<u32>value & 0x00FF00FF, 8)
13
- );
14
- }
15
- if (sizeof<T>() == 8) {
16
- let a = (<u64>value >> 8) & 0x00FF00FF00FF00FF;
17
- let b = (<u64>value & 0x00FF00FF00FF00FF) << 8;
18
- let v = a | b;
19
-
20
- a = (v >>> 16) & 0x0000FFFF0000FFFF;
21
- b = (v & 0x0000FFFF0000FFFF) << 16;
22
-
23
- return <T>rotr(a | b, 32);
24
- }
25
- }
26
- ERROR("Unsupported generic type");
27
- }
1
+ export function bswap<T extends number>(value: T): T {
2
+ if (isInteger<T>()) {
3
+ if (sizeof<T>() == 1) {
4
+ return value;
5
+ }
6
+ if (sizeof<T>() == 2) {
7
+ return <T>(<u16>value << 8 | (<u16>value >> 8));
8
+ }
9
+ if (sizeof<T>() == 4) {
10
+ return <T>(
11
+ rotl(<u32>value & 0xFF00FF00, 8) |
12
+ rotr(<u32>value & 0x00FF00FF, 8)
13
+ );
14
+ }
15
+ if (sizeof<T>() == 8) {
16
+ let a = (<u64>value >> 8) & 0x00FF00FF00FF00FF;
17
+ let b = (<u64>value & 0x00FF00FF00FF00FF) << 8;
18
+ let v = a | b;
19
+
20
+ a = (v >>> 16) & 0x0000FFFF0000FFFF;
21
+ b = (v & 0x0000FFFF0000FFFF) << 16;
22
+
23
+ return <T>rotr(a | b, 32);
24
+ }
25
+ }
26
+ ERROR("Unsupported generic type");
27
+ }
@@ -1,50 +1,50 @@
1
- import {
2
- Date as Date_binding,
3
- performance as performance_binding
4
- } from "bindings/dom";
5
-
6
- import {
7
- process as process_binding
8
- } from "bindings/node";
9
-
10
- export namespace process {
11
-
12
- // @ts-ignore: decorator
13
- @lazy export const arch = sizeof<usize>() == 4 ? "wasm32" : "wasm64";
14
-
15
- // @ts-ignore: decorator
16
- @lazy export const platform = "wasm";
17
-
18
- // @ts-ignore: decorator
19
- @lazy export const argv = lazyArgv();
20
-
21
- // @ts-ignore: decorator
22
- @lazy export const env = lazyEnv();
23
-
24
- // @ts-ignore: decorator
25
- @lazy export let exitCode = 0;
26
-
27
- export function exit(code: i32 = exitCode): void {
28
- process_binding.exit(code);
29
- }
30
-
31
- export function time(): i64 {
32
- return <i64>Date_binding.now();
33
- }
34
-
35
- export function hrtime(): u64 {
36
- let now = performance_binding.now();
37
- let millis = <u64>now;
38
- let fraction = now - <f64>millis;
39
- return millis * 1000000 + <u64>(fraction * 1000000);
40
- }
41
- }
42
-
43
- function lazyArgv(): string[] {
44
- return process_binding.argv;
45
- }
46
-
47
- function lazyEnv(): Map<string,string> {
48
- // TODO: What about Node?
49
- return new Map();
50
- }
1
+ import {
2
+ Date as Date_binding,
3
+ performance as performance_binding
4
+ } from "bindings/dom";
5
+
6
+ import {
7
+ process as process_binding
8
+ } from "bindings/node";
9
+
10
+ export namespace process {
11
+
12
+ // @ts-ignore: decorator
13
+ @lazy export const arch = sizeof<usize>() == 4 ? "wasm32" : "wasm64";
14
+
15
+ // @ts-ignore: decorator
16
+ @lazy export const platform = "wasm";
17
+
18
+ // @ts-ignore: decorator
19
+ @lazy export const argv = lazyArgv();
20
+
21
+ // @ts-ignore: decorator
22
+ @lazy export const env = lazyEnv();
23
+
24
+ // @ts-ignore: decorator
25
+ @lazy export let exitCode = 0;
26
+
27
+ export function exit(code: i32 = exitCode): void {
28
+ process_binding.exit(code);
29
+ }
30
+
31
+ export function time(): i64 {
32
+ return <i64>Date_binding.now();
33
+ }
34
+
35
+ export function hrtime(): u64 {
36
+ let now = performance_binding.now();
37
+ let millis = <u64>now;
38
+ let fraction = now - <f64>millis;
39
+ return millis * 1000000 + <u64>(fraction * 1000000);
40
+ }
41
+ }
42
+
43
+ function lazyArgv(): string[] {
44
+ return process_binding.argv;
45
+ }
46
+
47
+ function lazyEnv(): Map<string,string> {
48
+ // TODO: What about Node?
49
+ return new Map();
50
+ }
@@ -1,48 +1,48 @@
1
- // Canonical aliases
2
- export type funcref = ref_func | null;
3
- export type externref = ref_extern | null;
4
- export type anyref = ref_any | null;
5
- export type eqref = ref_eq | null;
6
- export type i31ref = ref_i31 | null;
7
- export type structref = ref_struct | null;
8
- export type arrayref = ref_array | null;
9
- export type stringref = ref_string | null;
10
- export type stringview_wtf8 = ref_stringview_wtf8 | null;
11
- export type stringview_wtf16 = ref_stringview_wtf16 | null;
12
- export type stringview_iter = ref_stringview_iter | null;
13
-
14
- @unmanaged
15
- abstract class Ref {
16
- }
17
-
18
- @final @unmanaged
19
- export abstract class RefFunc extends Ref {
20
- }
21
-
22
- @final @unmanaged
23
- export abstract class RefExtern extends Ref {
24
- }
25
-
26
- @final @unmanaged
27
- export abstract class RefAny extends Ref {
28
- }
29
-
30
- @final @unmanaged
31
- export abstract class RefEq extends Ref {
32
- }
33
-
34
- @final @unmanaged
35
- export abstract class RefI31 extends Ref {
36
- }
37
-
38
- @final @unmanaged
39
- export abstract class RefStruct extends Ref {
40
- }
41
-
42
- @final @unmanaged
43
- export abstract class RefArray extends Ref {
44
- }
45
-
46
- @final @unmanaged
47
- export abstract class RefString extends Ref {
48
- }
1
+ // Canonical aliases
2
+ export type funcref = ref_func | null;
3
+ export type externref = ref_extern | null;
4
+ export type anyref = ref_any | null;
5
+ export type eqref = ref_eq | null;
6
+ export type i31ref = ref_i31 | null;
7
+ export type structref = ref_struct | null;
8
+ export type arrayref = ref_array | null;
9
+ export type stringref = ref_string | null;
10
+ export type stringview_wtf8 = ref_stringview_wtf8 | null;
11
+ export type stringview_wtf16 = ref_stringview_wtf16 | null;
12
+ export type stringview_iter = ref_stringview_iter | null;
13
+
14
+ @unmanaged
15
+ abstract class Ref {
16
+ }
17
+
18
+ @final @unmanaged
19
+ export abstract class RefFunc extends Ref {
20
+ }
21
+
22
+ @final @unmanaged
23
+ export abstract class RefExtern extends Ref {
24
+ }
25
+
26
+ @final @unmanaged
27
+ export abstract class RefAny extends Ref {
28
+ }
29
+
30
+ @final @unmanaged
31
+ export abstract class RefEq extends Ref {
32
+ }
33
+
34
+ @final @unmanaged
35
+ export abstract class RefI31 extends Ref {
36
+ }
37
+
38
+ @final @unmanaged
39
+ export abstract class RefStruct extends Ref {
40
+ }
41
+
42
+ @final @unmanaged
43
+ export abstract class RefArray extends Ref {
44
+ }
45
+
46
+ @final @unmanaged
47
+ export abstract class RefString extends Ref {
48
+ }
@@ -1,12 +1,12 @@
1
- export class RegExp {
2
-
3
- // @binding(CALL_NEW, [ STRING, STRING], OBJECT_HANDLE)
4
- constructor(pattern: string, flags: string = "") { throw new Error("unreachable"); }
5
-
6
- // @binding(CALL_THIS, [ STRING ], PASS_THRU)
7
- test(search: string): bool { throw new Error("unreachable"); }
8
-
9
- // @binding(CALL_THIS, [], STRING)
10
- toString(): string { throw new Error("unreachable"); }
11
-
12
- }
1
+ export class RegExp {
2
+
3
+ // @binding(CALL_NEW, [ STRING, STRING], OBJECT_HANDLE)
4
+ constructor(pattern: string, flags: string = "") { throw new Error("unreachable"); }
5
+
6
+ // @binding(CALL_THIS, [ STRING ], PASS_THRU)
7
+ test(search: string): bool { throw new Error("unreachable"); }
8
+
9
+ // @binding(CALL_THIS, [], STRING)
10
+ toString(): string { throw new Error("unreachable"); }
11
+
12
+ }