diff --git a/compiler/typescript-emitter.go b/compiler/typescript-emitter.go index 60d989c2a..0f53501d7 100644 --- a/compiler/typescript-emitter.go +++ b/compiler/typescript-emitter.go @@ -648,8 +648,7 @@ func renderPositionalStructConstructor(b *strings.Builder, structType *loweredSt // Every instance carries the marker, false for a pointer's struct, so // that all instances of a class have one shape. - b.WriteString("\t\t;(this as any)[" + runtimeOwner.QualifiedHelper(RuntimeHelperStructValueMarker)) - b.WriteString("] = __goscriptValue === true\n\t}\n\n") + b.WriteString("\t\t;(this as any).__goStructValue = __goscriptValue === true\n\t}\n\n") } // renderPositionalStructClone emits the clone method of a positional struct @@ -709,7 +708,6 @@ const structFreshInitParam = "__goscriptFresh" // renderStruct emits field storage, value-copy operations, methods, and metadata. func renderStruct(b *strings.Builder, structType *loweredStruct, runtimeOwner *RuntimeContractOwner, trimTypeInfo bool) { markStructValue := runtimeOwner.QualifiedHelper(RuntimeHelperMarkAsStructValue) - structValueMarker := runtimeOwner.QualifiedHelper(RuntimeHelperStructValueMarker) cloneStructValue := runtimeOwner.QualifiedHelper(RuntimeHelperCloneStructValue) cloneArrayValue := runtimeOwner.QualifiedHelper(RuntimeHelperCloneArrayValue) copyElement := runtimeOwner.QualifiedHelper(RuntimeHelperCopyElement) @@ -833,9 +831,7 @@ func renderStruct(b *strings.Builder, structType *loweredStruct, runtimeOwner *R // that each class stores it at one site. Every instance has the // property, false for a pointer's struct, so that all instances of a // class have one shape and marking one later changes no shape. - b.WriteString("\t\t;(this as any)[") - b.WriteString(structValueMarker) - b.WriteString("] = __goscriptValue === true\n\t}\n\n") + b.WriteString("\t\t;(this as any).__goStructValue = __goscriptValue === true\n\t}\n\n") // The clone method copies the struct through its constructor. b.WriteString("\tpublic ") diff --git a/gs/builtin/builtin.ts b/gs/builtin/builtin.ts index 228bfc72d..00d2db343 100644 --- a/gs/builtin/builtin.ts +++ b/gs/builtin/builtin.ts @@ -10,6 +10,7 @@ import type { Slice, SliceProxy, StringHeaderData } from './slice.js' import { arrayValueTypeInfo, cloneArrayValue, + ownKeys, isArrayValue, isMarkedAsStructValue, isTypeInfoComparable, @@ -581,8 +582,8 @@ function fieldsEqual( a: Record, b: Record, ): boolean { - const aKeys = Object.keys(a) - const bKeys = Object.keys(b) + const aKeys = ownKeys(a) + const bKeys = ownKeys(b) if (aKeys.length !== bKeys.length) { return false } diff --git a/gs/builtin/map.ts b/gs/builtin/map.ts index 4c2165089..2c57e252d 100644 --- a/gs/builtin/map.ts +++ b/gs/builtin/map.ts @@ -3,6 +3,7 @@ import { canonicalPointerIdentity, isStructObject, isStructTypeInfo, + ownKeys, resolveTypeInfo, structFieldRuntimeKey, structValueMarker, @@ -394,7 +395,7 @@ function structKeyPlan(key: object): StructKeyField[] { // The fields are sorted by name so equal keys give equal text. const kinds = structFieldKinds(key) - const plan = Object.keys(key) + const plan = ownKeys(key) .sort() .map((name) => ({ name, kind: kinds?.get(name) })) diff --git a/gs/builtin/print.ts b/gs/builtin/print.ts index a75ea430d..5c7f6af3c 100644 --- a/gs/builtin/print.ts +++ b/gs/builtin/print.ts @@ -1,5 +1,5 @@ import { asArray, isSliceProxy, type Slice } from './slice.js' -import { isStructObject } from './type.js' +import { isStructObject, ownKeys } from './type.js' import { isVarRef } from './varRef.js' // A transpiled Go Error(), String(), or GoString() method may be async, so @@ -210,7 +210,7 @@ function formatObject( function getObjectEntries(value: Record): [string, any][] { // The fields of a struct are its own properties, functions included. if (isStructObject(value)) { - return Object.entries(value) + return ownKeys(value).map((key) => [key, value[key]]) } return Object.entries(value).filter( diff --git a/gs/builtin/type.ts b/gs/builtin/type.ts index 56717c8be..7c963a013 100644 --- a/gs/builtin/type.ts +++ b/gs/builtin/type.ts @@ -1055,7 +1055,7 @@ function matchesStructType(value: any, info: TypeInfo): boolean { if (typeof value === 'object' && value !== null && info.fields) { const fields = info.fields || [] const fieldNames = fields.map((field) => structFieldRuntimeKey(field)) - const valueFields = Object.keys(value) + const valueFields = ownKeys(value) const fieldsExist = fieldNames.every((field) => field in value) const sameFieldCount = valueFields.length === fieldNames.length @@ -1440,8 +1440,22 @@ function typedElementMatches( // structValueMarker is the property that marks a struct instance as a value, // not a pointer. The constructors of generated struct classes set it -// themselves. -export const structValueMarker = Symbol('structValue') +// themselves, by this name. It is a string key, which JavaScriptCore stores +// as fast as a field, where a symbol key on a new object made every struct +// value about ten times slower to make; ownKeys leaves it out of the keys of +// an object. +export const structValueMarker = '__goStructValue' + +// ownKeys returns the own enumerable keys of value, as Object.keys does, +// without the struct value marker. +export function ownKeys(value: object): string[] { + const keys = Object.keys(value) + const i = keys.lastIndexOf(structValueMarker) + if (i >= 0) { + keys.splice(i, 1) + } + return keys +} // markAsStructValue Mark a struct instance as representing a value (not pointer). export function markAsStructValue(value: T): T { @@ -1737,7 +1751,7 @@ function forwardStructFields(view: object, read: () => unknown): void { if (typeof current !== 'object' || current === null) { return } - for (const key of Object.keys(current)) { + for (const key of ownKeys(current)) { Object.defineProperty(view, key, { configurable: true, enumerable: true, diff --git a/gs/encoding/json/index.ts b/gs/encoding/json/index.ts index 57998753d..b36b8b9cb 100644 --- a/gs/encoding/json/index.ts +++ b/gs/encoding/json/index.ts @@ -738,7 +738,8 @@ function encodeJSON(v: unknown): string { } if (t === 'object') { const parts: string[] = [] - for (const [key, value] of Object.entries(v as Record)) { + for (const key of $.ownKeys(v as object)) { + const value = (v as Record)[key] parts.push(JSON.stringify(key) + ':' + encodeJSON(value)) } return '{' + parts.join(',') + '}' @@ -2920,7 +2921,7 @@ function structFields(value: Record): fieldMetadata[] { if (fields.length !== 0) { return fields } - return Object.keys(value).map((key) => ({ key, name: key })) + return $.ownKeys(value).map((key) => ({ key, name: key })) } // anonymousStructValueFields returns the fields of an anonymous struct diff --git a/gs/fmt/fmt.ts b/gs/fmt/fmt.ts index 5c0100a70..1077d6f21 100644 --- a/gs/fmt/fmt.ts +++ b/gs/fmt/fmt.ts @@ -629,7 +629,7 @@ function defaultFormatMaybe( const fields: $.StructFieldInfo[] = info?.kind === $.TypeKind.Struct ? info.fields - : Object.keys(value).map((name) => ({ + : $.ownKeys(value).map((name) => ({ name, key: name, type: $.basicType('unknown'), @@ -685,15 +685,15 @@ function defaultFormatMaybe( (value as any).constructor?.name && (value as any).constructor.name !== 'Object' ) { - const parts = Object.entries(value as Record).map( - ([k, v]) => { + const parts = $.ownKeys(value) + .map((key) => [key, value[key]] as const) + .map(([k, v]) => { const formatted = defaultFormatMaybe(v, flags, depth + 1) if (isPromiseLike(formatted)) { return formatted.then((resolved) => `${k}:${resolved}`) } return `${k}:${formatted}` - }, - ) + }) return joinMaybe(parts, ' ', '{', '}') } try { diff --git a/gs/hash/maphash/index.ts b/gs/hash/maphash/index.ts index 8d74f34f5..7c0a638dd 100644 --- a/gs/hash/maphash/index.ts +++ b/gs/hash/maphash/index.ts @@ -267,7 +267,7 @@ function writeValue(h: Hash, v: unknown): void { const fields = $.isStructObject(v) ? v : undefined if ($.isMarkedAsStructValue(v) && fields) { h.WriteByte(7) - for (const key of Object.keys(fields)) { + for (const key of $.ownKeys(fields)) { writeValue(h, fields[key]) } return diff --git a/gs/reflect/deepequal.ts b/gs/reflect/deepequal.ts index 7ccf35b17..5186093f1 100644 --- a/gs/reflect/deepequal.ts +++ b/gs/reflect/deepequal.ts @@ -49,7 +49,12 @@ // values that have been compared before, it treats the values as // equal rather than examining the values to which they point. // This ensures that DeepEqual terminates. -import { isNamedValueBox, isStructObject, isVarRef } from '../builtin/index.js' +import { + isNamedValueBox, + isStructObject, + isVarRef, + ownKeys, +} from '../builtin/index.js' import { ReflectValue } from './types.js' export function DeepEqual( @@ -163,8 +168,8 @@ export function DeepEqual( return false } - const keysX = Object.keys(x) - const keysY = Object.keys(y) + const keysX = ownKeys(x) + const keysY = ownKeys(y) if (keysX.length !== keysY.length) { return false } diff --git a/gs/reflect/type.ts b/gs/reflect/type.ts index ed71e4079..147938d2c 100644 --- a/gs/reflect/type.ts +++ b/gs/reflect/type.ts @@ -746,7 +746,7 @@ const invalidTypeInstance = new InvalidTypeClass() // without listing them all as Object.keys would. function isEmptyObject(value: object): boolean { for (const key in value) { - if (globalThis.Object.hasOwn(value, key)) { + if (key !== $.structValueMarker && globalThis.Object.hasOwn(value, key)) { return false } } diff --git a/gs/unique/index.ts b/gs/unique/index.ts index 4ed89428f..95c2bb9a2 100644 --- a/gs/unique/index.ts +++ b/gs/unique/index.ts @@ -105,7 +105,11 @@ function normalize( if ($.isStructObject(value)) { return { $type: value.constructor.name, - $fields: normalize({ ...value }, seen, nextID), + $fields: normalize( + Object.fromEntries($.ownKeys(value).map((k) => [k, value[k]])), + seen, + nextID, + ), } } const entries = Object.entries(value) diff --git a/tests/tests/address_of_pointer_deref/address_of_pointer_deref.gs.ts b/tests/tests/address_of_pointer_deref/address_of_pointer_deref.gs.ts index 5c86ae9c4..970f667bb 100644 --- a/tests/tests/address_of_pointer_deref/address_of_pointer_deref.gs.ts +++ b/tests/tests/address_of_pointer_deref/address_of_pointer_deref.gs.ts @@ -11,7 +11,7 @@ export class Col { constructor(__goscriptValue?: boolean, Name$?: string, Default$?: $.VarRef | null) { this.Name = Name$ ?? "" this.Default = Default$ ?? (null! as $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Col { diff --git a/tests/tests/address_taken_param_struct/address_taken_param_struct.gs.ts b/tests/tests/address_taken_param_struct/address_taken_param_struct.gs.ts index 16eceb0f5..6d09044cc 100644 --- a/tests/tests/address_taken_param_struct/address_taken_param_struct.gs.ts +++ b/tests/tests/address_taken_param_struct/address_taken_param_struct.gs.ts @@ -11,7 +11,7 @@ export class Format { constructor(__goscriptValue?: boolean, Name$?: string, Ext$?: $.Slice) { this.Name = Name$ ?? "" this.Ext = Ext$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Format { diff --git a/tests/tests/addressed_struct_interface/addressed_struct_interface.gs.ts b/tests/tests/addressed_struct_interface/addressed_struct_interface.gs.ts index 627892407..7b1e22430 100644 --- a/tests/tests/addressed_struct_interface/addressed_struct_interface.gs.ts +++ b/tests/tests/addressed_struct_interface/addressed_struct_interface.gs.ts @@ -18,7 +18,7 @@ export class Buffer { constructor(__goscriptValue?: boolean, data$?: $.Slice) { this.data = data$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Buffer { diff --git a/tests/tests/anonymous_struct_field_address/anonymous_struct_field_address.gs.ts b/tests/tests/anonymous_struct_field_address/anonymous_struct_field_address.gs.ts index 2392e70aa..4b9f28951 100644 --- a/tests/tests/anonymous_struct_field_address/anonymous_struct_field_address.gs.ts +++ b/tests/tests/anonymous_struct_field_address/anonymous_struct_field_address.gs.ts @@ -8,7 +8,7 @@ export class entry { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): entry { @@ -40,7 +40,7 @@ export class config { constructor(__goscriptValue?: boolean, core$?: {"bare": boolean, "name": string}) { this.core = core$ ?? $.anonymousStructValue({"bare": false, "name": ""}, { kind: $.TypeKind.Struct, methods: [], fields: [/* @__PURE__ */ $.structField("bare", /* @__PURE__ */ $.basicType("bool"), [0], 0, false, { pkgPath: "github.com/s4wave/goscript/tests/tests/anonymous_struct_field_address" }), /* @__PURE__ */ $.structField("name", /* @__PURE__ */ $.basicType("string"), [1], 8, false, { pkgPath: "github.com/s4wave/goscript/tests/tests/anonymous_struct_field_address" })] }) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): config { diff --git a/tests/tests/anonymous_struct_slice/anonymous_struct_slice.gs.ts b/tests/tests/anonymous_struct_slice/anonymous_struct_slice.gs.ts index 803dabef5..a6a70bfae 100644 --- a/tests/tests/anonymous_struct_slice/anonymous_struct_slice.gs.ts +++ b/tests/tests/anonymous_struct_slice/anonymous_struct_slice.gs.ts @@ -11,7 +11,7 @@ export class namedItem { constructor(__goscriptValue?: boolean, key$?: string, data$?: $.Slice) { this.key = key$ ?? "" this.data = data$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): namedItem { diff --git a/tests/tests/append_field_pointers/append_field_pointers.gs.ts b/tests/tests/append_field_pointers/append_field_pointers.gs.ts index 9804b169d..d0364b247 100644 --- a/tests/tests/append_field_pointers/append_field_pointers.gs.ts +++ b/tests/tests/append_field_pointers/append_field_pointers.gs.ts @@ -18,7 +18,7 @@ export class T { constructor(__goscriptValue?: boolean, N$?: number) { this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): T { @@ -58,7 +58,7 @@ export class Outer { constructor(__goscriptValue?: boolean, T$?: T, X$?: number) { this.T = T$ ?? new T(true) this.X = X$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Outer { @@ -96,7 +96,7 @@ export class Pair { constructor(__goscriptValue?: boolean, A$?: T, B$?: T) { this.A = A$ ?? new T(true) this.B = B$ ?? new T(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pair { diff --git a/tests/tests/append_spare_capacity/append_spare_capacity.gs.ts b/tests/tests/append_spare_capacity/append_spare_capacity.gs.ts index 31cfbaa9d..651d64a24 100644 --- a/tests/tests/append_spare_capacity/append_spare_capacity.gs.ts +++ b/tests/tests/append_spare_capacity/append_spare_capacity.gs.ts @@ -11,7 +11,7 @@ export class pos { constructor(__goscriptValue?: boolean, Line$?: number, Char$?: number) { this.Line = Line$ ?? 0 this.Char = Char$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pos { diff --git a/tests/tests/append_value_copy/append_value_copy.gs.ts b/tests/tests/append_value_copy/append_value_copy.gs.ts index d421a104b..94a7d7d5b 100644 --- a/tests/tests/append_value_copy/append_value_copy.gs.ts +++ b/tests/tests/append_value_copy/append_value_copy.gs.ts @@ -9,7 +9,7 @@ export class cell { constructor(__goscriptValue?: boolean, width$?: number) { this.width = width$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): cell { diff --git a/tests/tests/array_assign_in_place/array_assign_in_place.gs.ts b/tests/tests/array_assign_in_place/array_assign_in_place.gs.ts index cd0f952ac..d1c128c4c 100644 --- a/tests/tests/array_assign_in_place/array_assign_in_place.gs.ts +++ b/tests/tests/array_assign_in_place/array_assign_in_place.gs.ts @@ -8,7 +8,7 @@ export class T { constructor(__goscriptValue?: boolean, v$?: number) { this.v = v$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): T { @@ -42,7 +42,7 @@ export class S { constructor(__goscriptValue?: boolean, A$?: T[], N$?: number[]) { this.A = A$ ?? $.arrayValue(globalThis.Array.from({ length: 2 }, () => new T(true)), /* @__PURE__ */ $.arrayType("main.T", 2)) this.N = N$ ?? $.arrayValue(globalThis.Array.from({ length: 3 }, () => 0)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): S { diff --git a/tests/tests/array_byte_element_pointer/array_byte_element_pointer.gs.ts b/tests/tests/array_byte_element_pointer/array_byte_element_pointer.gs.ts index 1046140cb..19bfec06d 100644 --- a/tests/tests/array_byte_element_pointer/array_byte_element_pointer.gs.ts +++ b/tests/tests/array_byte_element_pointer/array_byte_element_pointer.gs.ts @@ -8,7 +8,7 @@ export class bitset { constructor(__goscriptValue?: boolean, bits$?: Uint8Array) { this.bits = bits$ ?? $.arrayValue(new Uint8Array(4)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): bitset { diff --git a/tests/tests/array_index_variable/array_index_variable.gs.ts b/tests/tests/array_index_variable/array_index_variable.gs.ts index 89a3dc85d..a6716f703 100644 --- a/tests/tests/array_index_variable/array_index_variable.gs.ts +++ b/tests/tests/array_index_variable/array_index_variable.gs.ts @@ -11,7 +11,7 @@ export class point { constructor(__goscriptValue?: boolean, x$?: number, y$?: number) { this.x = x$ ?? 0 this.y = y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { @@ -41,7 +41,7 @@ export class holder { constructor(__goscriptValue?: boolean, points$?: point[], names$?: string[]) { this.points = points$ ?? $.arrayValue(globalThis.Array.from({ length: 2 }, () => new point(true)), /* @__PURE__ */ $.arrayType("main.point", 2)) this.names = names$ ?? $.arrayValue(globalThis.Array.from({ length: 3 }, () => "")) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { diff --git a/tests/tests/array_pointer_element_slice/array_pointer_element_slice.gs.ts b/tests/tests/array_pointer_element_slice/array_pointer_element_slice.gs.ts index 8a34e98b6..0e9a000ad 100644 --- a/tests/tests/array_pointer_element_slice/array_pointer_element_slice.gs.ts +++ b/tests/tests/array_pointer_element_slice/array_pointer_element_slice.gs.ts @@ -11,7 +11,7 @@ export class node { constructor(__goscriptValue?: boolean, sub$?: $.Slice | null>, sub0$?: (node | $.VarRef | null)[]) { this.sub = sub$ ?? (null! as $.Slice | null>) this.sub0 = sub0$ ?? $.arrayValue(globalThis.Array.from({ length: 1 }, () => null)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): node { diff --git a/tests/tests/array_pointer_ops/array_pointer_ops.gs.ts b/tests/tests/array_pointer_ops/array_pointer_ops.gs.ts index defb90057..d4300248a 100644 --- a/tests/tests/array_pointer_ops/array_pointer_ops.gs.ts +++ b/tests/tests/array_pointer_ops/array_pointer_ops.gs.ts @@ -8,7 +8,7 @@ export class item { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { @@ -37,7 +37,7 @@ export class arrays { constructor(__goscriptValue?: boolean, slices$?: $.Slice[], items$?: item[]) { this.slices = slices$ ?? $.arrayValue(globalThis.Array.from({ length: 1 }, () => null)) this.items = items$ ?? $.arrayValue(globalThis.Array.from({ length: 1 }, () => new item(true)), /* @__PURE__ */ $.arrayType("main.item", 1)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): arrays { diff --git a/tests/tests/async_directives/async_directives.gs.ts b/tests/tests/async_directives/async_directives.gs.ts index 63f831516..c6f0b6fb3 100644 --- a/tests/tests/async_directives/async_directives.gs.ts +++ b/tests/tests/async_directives/async_directives.gs.ts @@ -30,7 +30,7 @@ export class prefixLogger { constructor(__goscriptValue?: boolean, prefix$?: string) { this.prefix = prefix$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): prefixLogger { @@ -61,7 +61,7 @@ export class addSink { constructor(__goscriptValue?: boolean, total$?: number) { this.total = total$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): addSink { @@ -94,7 +94,7 @@ export class chanSink { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): chanSink { @@ -131,7 +131,7 @@ export class Button { constructor(__goscriptValue?: boolean, OnClick$?: ((clicks: number) => number | globalThis.Promise) | null, OnHover$?: ((clicks: number) => number | globalThis.Promise) | null) { this.OnClick = OnClick$ ?? (null! as ((clicks: number) => number | globalThis.Promise) | null) this.OnHover = OnHover$ ?? (null! as ((clicks: number) => number | globalThis.Promise) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Button { @@ -158,7 +158,7 @@ export class summer { constructor(__goscriptValue?: boolean, n$?: number) { this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): summer { diff --git a/tests/tests/async_function_field/async_function_field.gs.ts b/tests/tests/async_function_field/async_function_field.gs.ts index 5552a3c4b..19d646595 100644 --- a/tests/tests/async_function_field/async_function_field.gs.ts +++ b/tests/tests/async_function_field/async_function_field.gs.ts @@ -9,7 +9,7 @@ export class loader { constructor(__goscriptValue?: boolean, load$?: ((_p0: string) => [any, boolean] | globalThis.Promise<[any, boolean]>) | null) { this.load = load$ ?? (null! as ((_p0: string) => [any, boolean] | globalThis.Promise<[any, boolean]>) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): loader { diff --git a/tests/tests/async_function_pointer_callback/async_function_pointer_callback.gs.ts b/tests/tests/async_function_pointer_callback/async_function_pointer_callback.gs.ts index dcbe17446..2c250c145 100644 --- a/tests/tests/async_function_pointer_callback/async_function_pointer_callback.gs.ts +++ b/tests/tests/async_function_pointer_callback/async_function_pointer_callback.gs.ts @@ -14,7 +14,7 @@ export class Snapshot { constructor(__goscriptValue?: boolean, base$?: number) { this.base = base$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Snapshot { @@ -52,7 +52,7 @@ export class Host { constructor(__goscriptValue?: boolean, process$?: atomic.Pointer) { this.process = process$ ?? $.markAsStructValue(new atomic.Pointer()) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Host { diff --git a/tests/tests/async_function_type_assertion/async_function_type_assertion.gs.ts b/tests/tests/async_function_type_assertion/async_function_type_assertion.gs.ts index 7b922572c..469c89306 100644 --- a/tests/tests/async_function_type_assertion/async_function_type_assertion.gs.ts +++ b/tests/tests/async_function_type_assertion/async_function_type_assertion.gs.ts @@ -8,7 +8,7 @@ export class Worker { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Worker { diff --git a/tests/tests/async_function_variable_assignment/main.gs.ts b/tests/tests/async_function_variable_assignment/main.gs.ts index ce107b674..677a8065d 100644 --- a/tests/tests/async_function_variable_assignment/main.gs.ts +++ b/tests/tests/async_function_variable_assignment/main.gs.ts @@ -9,7 +9,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{value?: number}>, __goscriptValue?: boolean) { this.value = init?.value ?? (0 as number) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): result { diff --git a/tests/tests/atomic_struct_field_init/atomic_struct_field_init.gs.ts b/tests/tests/atomic_struct_field_init/atomic_struct_field_init.gs.ts index b6988d1d9..353202c48 100644 --- a/tests/tests/atomic_struct_field_init/atomic_struct_field_init.gs.ts +++ b/tests/tests/atomic_struct_field_init/atomic_struct_field_init.gs.ts @@ -15,7 +15,7 @@ export class MyStruct { this.closed = closed$ ?? $.markAsStructValue(new atomic.Bool()) this.count = count$ ?? $.markAsStructValue(new atomic.Int32()) this.flag = flag$ ?? $.markAsStructValue(new atomic.Uint32()) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/binary_struct_pointer/binary_struct_pointer.gs.ts b/tests/tests/binary_struct_pointer/binary_struct_pointer.gs.ts index 956b7246f..ba0b50165 100644 --- a/tests/tests/binary_struct_pointer/binary_struct_pointer.gs.ts +++ b/tests/tests/binary_struct_pointer/binary_struct_pointer.gs.ts @@ -14,7 +14,7 @@ export class inner { constructor(__goscriptValue?: boolean, A$?: number, B$?: Uint8Array) { this.A = A$ ?? 0 this.B = B$ ?? $.arrayValue(new Uint8Array(2)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): inner { @@ -50,7 +50,7 @@ export class vec4 { this.Y = Y$ ?? 0 this.Z = Z$ ?? 0 this.W = W$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): vec4 { @@ -91,7 +91,7 @@ export class item { this.Index = Index$ ?? 0 this.Flags = Flags$ ?? 0 this._blank4 = _blank4$ ?? $.arrayValue(globalThis.Array.from({ length: 2 }, () => 0), /* @__PURE__ */ $.arrayType(/* @__PURE__ */ $.basicType("float32"), 2)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { @@ -133,7 +133,7 @@ export class header { this.Res = Res$ ?? $.arrayValue(globalThis.Array.from({ length: 2 }, () => 0)) this.In = In$ ?? new inner(true) this.Width = Width$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): header { diff --git a/tests/tests/binary_uint32_slice_loop/binary_uint32_slice_loop.gs.ts b/tests/tests/binary_uint32_slice_loop/binary_uint32_slice_loop.gs.ts index 50c37ee17..c566b89a4 100644 --- a/tests/tests/binary_uint32_slice_loop/binary_uint32_slice_loop.gs.ts +++ b/tests/tests/binary_uint32_slice_loop/binary_uint32_slice_loop.gs.ts @@ -10,7 +10,7 @@ export class attrs { constructor(__goscriptValue?: boolean, packedData$?: string) { this.packedData = packedData$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): attrs { diff --git a/tests/tests/blank_parameters/blank_parameters.gs.ts b/tests/tests/blank_parameters/blank_parameters.gs.ts index f5b3cd175..771b2e063 100644 --- a/tests/tests/blank_parameters/blank_parameters.gs.ts +++ b/tests/tests/blank_parameters/blank_parameters.gs.ts @@ -18,7 +18,7 @@ export class blankImpl { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): blankImpl { @@ -46,7 +46,7 @@ export class blankImpl { export class Packer { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Packer { diff --git a/tests/tests/blank_struct_fields/blank_struct_fields.gs.ts b/tests/tests/blank_struct_fields/blank_struct_fields.gs.ts index 0b59dd5d5..9975b9edb 100644 --- a/tests/tests/blank_struct_fields/blank_struct_fields.gs.ts +++ b/tests/tests/blank_struct_fields/blank_struct_fields.gs.ts @@ -14,7 +14,7 @@ export class padded { this._blank0 = _blank0$ ?? $.arrayValue(new Uint8Array(2)) this.Value = Value$ ?? 0 this._blank2 = _blank2$ ?? $.arrayValue(new Uint8Array(3)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): padded { diff --git a/tests/tests/bodyless_async_callback/bodyless_async_callback.gs.ts b/tests/tests/bodyless_async_callback/bodyless_async_callback.gs.ts index 1722fc36d..d1e76e0df 100644 --- a/tests/tests/bodyless_async_callback/bodyless_async_callback.gs.ts +++ b/tests/tests/bodyless_async_callback/bodyless_async_callback.gs.ts @@ -10,7 +10,7 @@ export class Setting { constructor(__goscriptValue?: boolean, once$?: sync.Once) { this.once = once$ ?? $.markAsStructValue(new sync.Once()) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Setting { diff --git a/tests/tests/bulk_copy_array_values/bulk_copy_array_values.gs.ts b/tests/tests/bulk_copy_array_values/bulk_copy_array_values.gs.ts index 82193608a..5d2a44189 100644 --- a/tests/tests/bulk_copy_array_values/bulk_copy_array_values.gs.ts +++ b/tests/tests/bulk_copy_array_values/bulk_copy_array_values.gs.ts @@ -10,7 +10,7 @@ export class point { constructor(__goscriptValue?: boolean, x$?: number) { this.x = x$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { diff --git a/tests/tests/byte_slice_composite_literal/byte_slice_composite_literal.gs.ts b/tests/tests/byte_slice_composite_literal/byte_slice_composite_literal.gs.ts index ec77563f3..61a856526 100644 --- a/tests/tests/byte_slice_composite_literal/byte_slice_composite_literal.gs.ts +++ b/tests/tests/byte_slice_composite_literal/byte_slice_composite_literal.gs.ts @@ -8,7 +8,7 @@ export class holder { constructor(__goscriptValue?: boolean, data$?: $.Slice) { this.data = data$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { diff --git a/tests/tests/call_imported_interface_param/main.gs.ts b/tests/tests/call_imported_interface_param/main.gs.ts index 480ac262f..a1bf2db55 100644 --- a/tests/tests/call_imported_interface_param/main.gs.ts +++ b/tests/tests/call_imported_interface_param/main.gs.ts @@ -10,7 +10,7 @@ export class Buffer { constructor(__goscriptValue?: boolean, data$?: $.Slice) { this.data = data$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Buffer { diff --git a/tests/tests/class_declaration_order/class_declaration_order.gs.ts b/tests/tests/class_declaration_order/class_declaration_order.gs.ts index f54c9a940..1235a2ff9 100644 --- a/tests/tests/class_declaration_order/class_declaration_order.gs.ts +++ b/tests/tests/class_declaration_order/class_declaration_order.gs.ts @@ -15,7 +15,7 @@ $.registerInterfaceType( export class lateType { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): lateType { diff --git a/tests/tests/comments_struct/comments_struct.gs.ts b/tests/tests/comments_struct/comments_struct.gs.ts index 347ca8f5e..96f9354ea 100644 --- a/tests/tests/comments_struct/comments_struct.gs.ts +++ b/tests/tests/comments_struct/comments_struct.gs.ts @@ -13,7 +13,7 @@ export class TestStruct { constructor(__goscriptValue?: boolean, IntField$?: number, StringField$?: string) { this.IntField = IntField$ ?? 0 this.StringField = StringField$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): TestStruct { diff --git a/tests/tests/composite_literal_assignment/composite_literal_assignment.gs.ts b/tests/tests/composite_literal_assignment/composite_literal_assignment.gs.ts index e011531dc..44de5c87f 100644 --- a/tests/tests/composite_literal_assignment/composite_literal_assignment.gs.ts +++ b/tests/tests/composite_literal_assignment/composite_literal_assignment.gs.ts @@ -14,7 +14,7 @@ export class MyStruct { this.MyInt = MyInt$ ?? 0 this.MyString = MyString$ ?? "" this.myBool = myBool$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/composite_literal_field_shadow/composite_literal_field_shadow.gs.ts b/tests/tests/composite_literal_field_shadow/composite_literal_field_shadow.gs.ts index fa8d67b9b..3388620b2 100644 --- a/tests/tests/composite_literal_field_shadow/composite_literal_field_shadow.gs.ts +++ b/tests/tests/composite_literal_field_shadow/composite_literal_field_shadow.gs.ts @@ -8,7 +8,7 @@ export class buffer { constructor(__goscriptValue?: boolean, buf$?: $.Slice) { this.buf = buf$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): buffer { diff --git a/tests/tests/composite_literal_nested_await/composite_literal_nested_await.gs.ts b/tests/tests/composite_literal_nested_await/composite_literal_nested_await.gs.ts index d6bb95867..2b5a384a8 100644 --- a/tests/tests/composite_literal_nested_await/composite_literal_nested_await.gs.ts +++ b/tests/tests/composite_literal_nested_await/composite_literal_nested_await.gs.ts @@ -14,7 +14,7 @@ export class command { this.name = name$ ?? "" this.flags = flags$ ?? (null! as $.Slice) this.action = action$ ?? (null! as (() => number | globalThis.Promise) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): command { @@ -42,7 +42,7 @@ export class config { constructor(__goscriptValue?: boolean, flags$?: ((prefix: string) => $.Slice | globalThis.Promise<$.Slice>) | null) { this.flags = flags$ ?? (null! as ((prefix: string) => $.Slice | globalThis.Promise<$.Slice>) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): config { diff --git a/tests/tests/compound_assign_side_effects/compound_assign_side_effects.gs.ts b/tests/tests/compound_assign_side_effects/compound_assign_side_effects.gs.ts index 6bd9276bc..5ab38af98 100644 --- a/tests/tests/compound_assign_side_effects/compound_assign_side_effects.gs.ts +++ b/tests/tests/compound_assign_side_effects/compound_assign_side_effects.gs.ts @@ -33,7 +33,7 @@ export class point { this.I64 = I64$ ?? 0n this.U32 = U32$ ?? 0 this.F32 = F32$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { @@ -64,7 +64,7 @@ export class chanCounter { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): chanCounter { diff --git a/tests/tests/conn_id_generator_methods/conn_id_generator_methods.gs.ts b/tests/tests/conn_id_generator_methods/conn_id_generator_methods.gs.ts index ae553200e..80b32ce30 100644 --- a/tests/tests/conn_id_generator_methods/conn_id_generator_methods.gs.ts +++ b/tests/tests/conn_id_generator_methods/conn_id_generator_methods.gs.ts @@ -44,7 +44,7 @@ export class transport { constructor(__goscriptValue?: boolean, values$?: globalThis.Map | null) { this.values = values$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): transport { @@ -75,7 +75,7 @@ export class packetHandlerMap { constructor(__goscriptValue?: boolean, values$?: globalThis.Map | null) { this.values = values$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): packetHandlerMap { @@ -106,7 +106,7 @@ export class connRunnerCallbacks { constructor(__goscriptValue?: boolean, AddConnectionID$?: ((_p0: number) => void) | null) { this.AddConnectionID = AddConnectionID$ ?? (null! as ((_p0: number) => void) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): connRunnerCallbacks { diff --git a/tests/tests/copy_independence/copy_independence.gs.ts b/tests/tests/copy_independence/copy_independence.gs.ts index ce0a62a50..eb4bfc8c7 100644 --- a/tests/tests/copy_independence/copy_independence.gs.ts +++ b/tests/tests/copy_independence/copy_independence.gs.ts @@ -11,7 +11,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, MyInt$?: number, MyString$?: string) { this.MyInt = MyInt$ ?? 0 this.MyString = MyString$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/copy_struct_elements_in_place/copy_struct_elements_in_place.gs.ts b/tests/tests/copy_struct_elements_in_place/copy_struct_elements_in_place.gs.ts index 53b491bc0..b28e61b9f 100644 --- a/tests/tests/copy_struct_elements_in_place/copy_struct_elements_in_place.gs.ts +++ b/tests/tests/copy_struct_elements_in_place/copy_struct_elements_in_place.gs.ts @@ -13,7 +13,7 @@ export class inner { constructor(__goscriptValue?: boolean, N$?: number[]) { this.N = N$ ?? $.arrayValue(globalThis.Array.from({ length: 2 }, () => 0)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): inner { @@ -45,7 +45,7 @@ export class item { this.X = X$ ?? 0 this.Y = Y$ ?? 0 this.In = In$ ?? new inner(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/cross_file_const_init_order/register.gs.ts b/tests/tests/cross_file_const_init_order/register.gs.ts index 48349c245..e576ae203 100644 --- a/tests/tests/cross_file_const_init_order/register.gs.ts +++ b/tests/tests/cross_file_const_init_order/register.gs.ts @@ -7,7 +7,7 @@ import "./consts.gs.ts" export class thing { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): thing { diff --git a/tests/tests/cross_file_function_result_type/helper.gs.ts b/tests/tests/cross_file_function_result_type/helper.gs.ts index 284e61a1d..ff45d9527 100644 --- a/tests/tests/cross_file_function_result_type/helper.gs.ts +++ b/tests/tests/cross_file_function_result_type/helper.gs.ts @@ -8,7 +8,7 @@ export class token { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): token { diff --git a/tests/tests/cross_file_method_imports/helper.gs.ts b/tests/tests/cross_file_method_imports/helper.gs.ts index 2f2dff1b1..74d53a2a3 100644 --- a/tests/tests/cross_file_method_imports/helper.gs.ts +++ b/tests/tests/cross_file_method_imports/helper.gs.ts @@ -8,7 +8,7 @@ export class helperState { constructor(__goscriptValue?: boolean, text$?: string) { this.text = text$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): helperState { diff --git a/tests/tests/cross_file_method_imports/type.gs.ts b/tests/tests/cross_file_method_imports/type.gs.ts index 3f4f42f55..c9bd282f0 100644 --- a/tests/tests/cross_file_method_imports/type.gs.ts +++ b/tests/tests/cross_file_method_imports/type.gs.ts @@ -12,7 +12,7 @@ export class label { constructor(__goscriptValue?: boolean, value$?: string) { this.value = value$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): label { diff --git a/tests/tests/cross_file_method_owner/box.gs.ts b/tests/tests/cross_file_method_owner/box.gs.ts index a466ae9c2..aa4a82596 100644 --- a/tests/tests/cross_file_method_owner/box.gs.ts +++ b/tests/tests/cross_file_method_owner/box.gs.ts @@ -24,7 +24,7 @@ export class pile { constructor(__goscriptValue?: boolean, step$?: number) { this.step = step$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pile { diff --git a/tests/tests/cross_file_struct_typeinfo_zero/a.gs.ts b/tests/tests/cross_file_struct_typeinfo_zero/a.gs.ts index 275e08b33..5fb8ce7ff 100644 --- a/tests/tests/cross_file_struct_typeinfo_zero/a.gs.ts +++ b/tests/tests/cross_file_struct_typeinfo_zero/a.gs.ts @@ -10,7 +10,7 @@ export class aValue { constructor(__goscriptValue?: boolean, next$?: __goscript_b.bValue | $.VarRef<__goscript_b.bValue> | null) { this.next = next$ ?? (null! as __goscript_b.bValue | $.VarRef<__goscript_b.bValue> | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): aValue { diff --git a/tests/tests/cross_file_struct_typeinfo_zero/b.gs.ts b/tests/tests/cross_file_struct_typeinfo_zero/b.gs.ts index 18558b978..2c16b7f6d 100644 --- a/tests/tests/cross_file_struct_typeinfo_zero/b.gs.ts +++ b/tests/tests/cross_file_struct_typeinfo_zero/b.gs.ts @@ -9,7 +9,7 @@ export class bValue { constructor(__goscriptValue?: boolean, inner$?: __goscript_a.aValue) { this.inner = inner$ ?? new __goscript_a.aValue(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): bValue { diff --git a/tests/tests/cross_file_varref_struct_field/info.gs.ts b/tests/tests/cross_file_varref_struct_field/info.gs.ts index 2cef62350..ed54e9829 100644 --- a/tests/tests/cross_file_varref_struct_field/info.gs.ts +++ b/tests/tests/cross_file_varref_struct_field/info.gs.ts @@ -11,7 +11,7 @@ export class floatInfo { constructor(__goscriptValue?: boolean, mantbits$?: number, expbits$?: number) { this.mantbits = mantbits$ ?? 0 this.expbits = expbits$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): floatInfo { diff --git a/tests/tests/cross_package_unexported_interface_field/dep/dep.gs.ts b/tests/tests/cross_package_unexported_interface_field/dep/dep.gs.ts index ceffe4a46..dec73a916 100644 --- a/tests/tests/cross_package_unexported_interface_field/dep/dep.gs.ts +++ b/tests/tests/cross_package_unexported_interface_field/dep/dep.gs.ts @@ -17,7 +17,7 @@ $.registerInterfaceType( export class impl { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): impl { @@ -46,7 +46,7 @@ export class Holder { constructor(__goscriptValue?: boolean, Hidden$?: hidden | null) { this.Hidden = Hidden$ ?? (null! as hidden | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Holder { diff --git a/tests/tests/database_sql_scan/database_sql_scan.gs.ts b/tests/tests/database_sql_scan/database_sql_scan.gs.ts index 41c7d3c48..0431be9ae 100644 --- a/tests/tests/database_sql_scan/database_sql_scan.gs.ts +++ b/tests/tests/database_sql_scan/database_sql_scan.gs.ts @@ -18,7 +18,7 @@ export class connector { constructor(__goscriptValue?: boolean, direct$?: boolean, blob$?: boolean) { this.direct = direct$ ?? false this.blob = blob$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): connector { @@ -93,7 +93,7 @@ export class rows { constructor(__goscriptValue?: boolean, done$?: boolean, blob$?: boolean) { this.done = done$ ?? false this.blob = blob$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): rows { @@ -143,7 +143,7 @@ export class columnRows { constructor(__goscriptValue?: boolean, rows$?: rows) { this.rows = rows$ ?? new rows(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): columnRows { @@ -256,7 +256,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{Value?: number}>, __goscriptValue?: boolean) { this.Value = init?.Value ?? (0 as number) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): tagged { @@ -281,7 +281,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{Value?: number}>, __goscriptValue?: boolean) { this.Value = init?.Value ?? (0 as number) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): retagged { diff --git a/tests/tests/dead_code_methods/dead_code_methods.gs.ts b/tests/tests/dead_code_methods/dead_code_methods.gs.ts index 2d64e71c5..7c621aeb0 100644 --- a/tests/tests/dead_code_methods/dead_code_methods.gs.ts +++ b/tests/tests/dead_code_methods/dead_code_methods.gs.ts @@ -82,7 +82,7 @@ export class Dog { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Dog { @@ -122,7 +122,7 @@ export class Counter { constructor(__goscriptValue?: boolean, n$?: number) { this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Counter { @@ -165,7 +165,7 @@ export class Inner { constructor(__goscriptValue?: boolean, label$?: string) { this.label = label$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Inner { @@ -204,7 +204,7 @@ export class Outer { constructor(__goscriptValue?: boolean, Inner$?: Inner | $.VarRef | null, Speaker$?: Speaker | null) { this.Inner = Inner$ ?? (null! as Inner | $.VarRef | null) this.Speaker = Speaker$ ?? (null! as Speaker | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Outer { @@ -240,7 +240,7 @@ export class Outer { export class Cat { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Cat { @@ -273,7 +273,7 @@ export class Box { constructor(__goscriptValue?: boolean, v$?: any) { this.v = v$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Box { @@ -304,7 +304,7 @@ export class myErr { constructor(__goscriptValue?: boolean, code$?: number) { this.code = code$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): myErr { diff --git a/tests/tests/dead_code_reflect_methods/dead_code_reflect_methods.gs.ts b/tests/tests/dead_code_reflect_methods/dead_code_reflect_methods.gs.ts index ae9ed2127..1b92d9667 100644 --- a/tests/tests/dead_code_reflect_methods/dead_code_reflect_methods.gs.ts +++ b/tests/tests/dead_code_reflect_methods/dead_code_reflect_methods.gs.ts @@ -24,7 +24,7 @@ export class Calc { constructor(__goscriptValue?: boolean, base$?: number) { this.base = base$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Calc { diff --git a/tests/tests/defer_async_method/defer_async_method.gs.ts b/tests/tests/defer_async_method/defer_async_method.gs.ts index 63025c5bc..587f27ae3 100644 --- a/tests/tests/defer_async_method/defer_async_method.gs.ts +++ b/tests/tests/defer_async_method/defer_async_method.gs.ts @@ -8,7 +8,7 @@ export class AsyncResource { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): AsyncResource { diff --git a/tests/tests/defer_go_argument_evaluation/defer_go_argument_evaluation.gs.ts b/tests/tests/defer_go_argument_evaluation/defer_go_argument_evaluation.gs.ts index 2e5dcf63a..9fdef6ea1 100644 --- a/tests/tests/defer_go_argument_evaluation/defer_go_argument_evaluation.gs.ts +++ b/tests/tests/defer_go_argument_evaluation/defer_go_argument_evaluation.gs.ts @@ -12,7 +12,7 @@ export class R { constructor(__goscriptValue?: boolean, A$?: number, B$?: number) { this.A = A$ ?? 0 this.B = B$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): R { diff --git a/tests/tests/defined_external_struct_wrapper/defined_external_struct_wrapper.gs.ts b/tests/tests/defined_external_struct_wrapper/defined_external_struct_wrapper.gs.ts index 26a825f80..1f64e73f9 100644 --- a/tests/tests/defined_external_struct_wrapper/defined_external_struct_wrapper.gs.ts +++ b/tests/tests/defined_external_struct_wrapper/defined_external_struct_wrapper.gs.ts @@ -12,7 +12,7 @@ export class Wrapped { constructor(__goscriptValue?: boolean, Value$?: string, Hidden$?: dep.hidden) { this.Value = Value$ ?? "" this.Hidden = Hidden$ ?? new dep.hidden(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Wrapped { diff --git a/tests/tests/defined_external_struct_wrapper/dep/dep.gs.ts b/tests/tests/defined_external_struct_wrapper/dep/dep.gs.ts index 3a0654d9c..0e4bd44d3 100644 --- a/tests/tests/defined_external_struct_wrapper/dep/dep.gs.ts +++ b/tests/tests/defined_external_struct_wrapper/dep/dep.gs.ts @@ -10,7 +10,7 @@ export class hidden { constructor(__goscriptValue?: boolean, label$?: string) { this.label = label$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): hidden { @@ -39,7 +39,7 @@ export class Public { constructor(__goscriptValue?: boolean, Value$?: string, Hidden$?: hidden) { this.Value = Value$ ?? "" this.Hidden = Hidden$ ?? new hidden(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Public { diff --git a/tests/tests/embedded_interface_assertion/embedded_interface_assertion.gs.ts b/tests/tests/embedded_interface_assertion/embedded_interface_assertion.gs.ts index 82bb3156f..90ae029d5 100644 --- a/tests/tests/embedded_interface_assertion/embedded_interface_assertion.gs.ts +++ b/tests/tests/embedded_interface_assertion/embedded_interface_assertion.gs.ts @@ -36,7 +36,7 @@ $.registerInterfaceType( export class MyStruct { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/embedded_interface_forwarding/embedded_interface_forwarding.gs.ts b/tests/tests/embedded_interface_forwarding/embedded_interface_forwarding.gs.ts index 0a0a121ba..541e30677 100644 --- a/tests/tests/embedded_interface_forwarding/embedded_interface_forwarding.gs.ts +++ b/tests/tests/embedded_interface_forwarding/embedded_interface_forwarding.gs.ts @@ -18,7 +18,7 @@ export class Box { constructor(__goscriptValue?: boolean, Adder$?: Adder | null) { this.Adder = Adder$ ?? (null! as Adder | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Box { @@ -48,7 +48,7 @@ export class Counter { constructor(__goscriptValue?: boolean, base$?: number) { this.base = base$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Counter { diff --git a/tests/tests/embedded_interface_null_assertion/embedded_interface_null_assertion.gs.ts b/tests/tests/embedded_interface_null_assertion/embedded_interface_null_assertion.gs.ts index e4d743ccb..c29245bc2 100644 --- a/tests/tests/embedded_interface_null_assertion/embedded_interface_null_assertion.gs.ts +++ b/tests/tests/embedded_interface_null_assertion/embedded_interface_null_assertion.gs.ts @@ -21,7 +21,7 @@ export class MyReader { constructor(__goscriptValue?: boolean, Reader$?: Reader | null, name$?: string) { this.Reader = Reader$ ?? (null! as Reader | null) this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyReader { @@ -55,7 +55,7 @@ export class StringReader { constructor(__goscriptValue?: boolean, data$?: string, pos$?: number) { this.data = data$ ?? "" this.pos = pos$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): StringReader { diff --git a/tests/tests/embedded_named_basic_method/embedded_named_basic_method.gs.ts b/tests/tests/embedded_named_basic_method/embedded_named_basic_method.gs.ts index 1a3903b81..b7b160250 100644 --- a/tests/tests/embedded_named_basic_method/embedded_named_basic_method.gs.ts +++ b/tests/tests/embedded_named_basic_method/embedded_named_basic_method.gs.ts @@ -55,7 +55,7 @@ export class Engineer { constructor(__goscriptValue?: boolean, Level$?: Level, Name$?: string) { this.Level = Level$ ?? 0 this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Engineer { @@ -86,7 +86,7 @@ export class Lead { constructor(__goscriptValue?: boolean, Engineer$?: Engineer) { this.Engineer = Engineer$ ?? new Engineer(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Lead { @@ -116,7 +116,7 @@ export class Post { constructor(__goscriptValue?: boolean, Tags$?: Tags) { this.Tags = Tags$ ?? (null! as Tags) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Post { diff --git a/tests/tests/factory_async_callback/dep/dep.gs.ts b/tests/tests/factory_async_callback/dep/dep.gs.ts index f3363665c..0d0a43981 100644 --- a/tests/tests/factory_async_callback/dep/dep.gs.ts +++ b/tests/tests/factory_async_callback/dep/dep.gs.ts @@ -17,7 +17,7 @@ $.registerInterfaceType( export class Bus { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Bus { @@ -39,7 +39,7 @@ export class Bus { export class factory { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): factory { diff --git a/tests/tests/field_pointer_receiver_identity/field_pointer_receiver_identity.gs.ts b/tests/tests/field_pointer_receiver_identity/field_pointer_receiver_identity.gs.ts index dadf7b958..66074b456 100644 --- a/tests/tests/field_pointer_receiver_identity/field_pointer_receiver_identity.gs.ts +++ b/tests/tests/field_pointer_receiver_identity/field_pointer_receiver_identity.gs.ts @@ -23,7 +23,7 @@ export class Node { constructor(__goscriptValue?: boolean, name$?: string, self$?: Node | $.VarRef | null) { this.name = name$ ?? "" this.self = self$ ?? (null! as Node | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Node { @@ -89,7 +89,7 @@ export class Item { this.Group = Group$ ?? $.anonymousStructValue({"Leaf": new Node(true)}, { kind: $.TypeKind.Struct, methods: [], fields: [/* @__PURE__ */ $.structField("Leaf", "main.Node", [0], 0, true)] }) this.List = List$ ?? (null! as $.Slice) this.Pair = Pair$ ?? $.arrayValue(globalThis.Array.from({ length: 2 }, () => new Node(true)), /* @__PURE__ */ $.arrayType("main.Node", 2)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Item { @@ -135,7 +135,7 @@ export class Outer { constructor(__goscriptValue?: boolean, Item$?: Item) { this.Item = Item$ ?? new Item(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Outer { @@ -180,7 +180,7 @@ export class Self { constructor(__goscriptValue?: boolean, self$?: Self | $.VarRef | null, v$?: any) { this.self = self$ ?? (null! as Self | $.VarRef | null) this.v = v$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Self { @@ -214,7 +214,7 @@ export class Box { constructor(__goscriptValue?: boolean, values$?: $.Slice) { this.values = values$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Box { diff --git a/tests/tests/field_pointer_receiver_packages/field_pointer_receiver_packages.gs.ts b/tests/tests/field_pointer_receiver_packages/field_pointer_receiver_packages.gs.ts index 500d6ef10..fdaa6a9db 100644 --- a/tests/tests/field_pointer_receiver_packages/field_pointer_receiver_packages.gs.ts +++ b/tests/tests/field_pointer_receiver_packages/field_pointer_receiver_packages.gs.ts @@ -17,7 +17,7 @@ export class Outer { constructor(__goscriptValue?: boolean, Mid$?: inner.Mid, Local$?: __goscript_widget.Widget) { this.Mid = Mid$ ?? new inner.Mid(true) this.Local = Local$ ?? new __goscript_widget.Widget(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Outer { diff --git a/tests/tests/field_pointer_receiver_packages/inner/inner.gs.ts b/tests/tests/field_pointer_receiver_packages/inner/inner.gs.ts index a609d38b5..b83774ac3 100644 --- a/tests/tests/field_pointer_receiver_packages/inner/inner.gs.ts +++ b/tests/tests/field_pointer_receiver_packages/inner/inner.gs.ts @@ -13,7 +13,7 @@ export class Base { constructor(__goscriptValue?: boolean, Self$?: Base | $.VarRef | null, N$?: number) { this.Self = Self$ ?? (null! as Base | $.VarRef | null) this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Base { @@ -47,7 +47,7 @@ export class base { constructor(__goscriptValue?: boolean, self$?: base | $.VarRef | null) { this.self = self$ ?? (null! as base | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): base { @@ -83,7 +83,7 @@ export class Mid { constructor(__goscriptValue?: boolean, Base$?: Base, base$?: base) { this.Base = Base$ ?? new Base(true) this.base = base$ ?? new base(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Mid { diff --git a/tests/tests/field_pointer_receiver_packages/types.gs.ts b/tests/tests/field_pointer_receiver_packages/types.gs.ts index 9a245bba4..b103c3afe 100644 --- a/tests/tests/field_pointer_receiver_packages/types.gs.ts +++ b/tests/tests/field_pointer_receiver_packages/types.gs.ts @@ -13,7 +13,7 @@ export class Base { constructor(__goscriptValue?: boolean, self$?: Base | $.VarRef | null, n$?: number) { this.self = self$ ?? (null! as Base | $.VarRef | null) this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Base { diff --git a/tests/tests/field_pointer_receiver_packages/widget.gs.ts b/tests/tests/field_pointer_receiver_packages/widget.gs.ts index 016408948..b023dbcf2 100644 --- a/tests/tests/field_pointer_receiver_packages/widget.gs.ts +++ b/tests/tests/field_pointer_receiver_packages/widget.gs.ts @@ -14,7 +14,7 @@ export class Widget { constructor(__goscriptValue?: boolean, Base$?: __goscript_types.Base, name$?: string) { this.Base = Base$ ?? new __goscript_types.Base(true) this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Widget { diff --git a/tests/tests/float32_rounding/float32_rounding.gs.ts b/tests/tests/float32_rounding/float32_rounding.gs.ts index 0abc8c290..afff79ba4 100644 --- a/tests/tests/float32_rounding/float32_rounding.gs.ts +++ b/tests/tests/float32_rounding/float32_rounding.gs.ts @@ -16,7 +16,7 @@ export class T { constructor(__goscriptValue?: boolean, A$?: string, B$?: number) { this.A = A$ ?? "" this.B = B$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): T { diff --git a/tests/tests/fmt_func_values/fmt_func_values.gs.ts b/tests/tests/fmt_func_values/fmt_func_values.gs.ts index fd7bfe1fc..8b94887bc 100644 --- a/tests/tests/fmt_func_values/fmt_func_values.gs.ts +++ b/tests/tests/fmt_func_values/fmt_func_values.gs.ts @@ -13,7 +13,7 @@ export class Tiered { constructor(__goscriptValue?: boolean, First$?: $.Slice<(() => void) | null>, Normal$?: $.Slice<(() => void) | null>) { this.First = First$ ?? (null! as $.Slice<(() => void) | null>) this.Normal = Normal$ ?? (null! as $.Slice<(() => void) | null>) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Tiered { diff --git a/tests/tests/fmt_nil_values/fmt_nil_values.gs.ts b/tests/tests/fmt_nil_values/fmt_nil_values.gs.ts index f387a3758..a1c99b7ea 100644 --- a/tests/tests/fmt_nil_values/fmt_nil_values.gs.ts +++ b/tests/tests/fmt_nil_values/fmt_nil_values.gs.ts @@ -25,7 +25,7 @@ export class T { constructor(__goscriptValue?: boolean, A$?: number) { this.A = A$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): T { diff --git a/tests/tests/fmt_print_async_method/fmt_print_async_method.gs.ts b/tests/tests/fmt_print_async_method/fmt_print_async_method.gs.ts index c6332f8a8..2b8e64c84 100644 --- a/tests/tests/fmt_print_async_method/fmt_print_async_method.gs.ts +++ b/tests/tests/fmt_print_async_method/fmt_print_async_method.gs.ts @@ -9,7 +9,7 @@ export class slowName { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): slowName { @@ -44,7 +44,7 @@ export class point { constructor(__goscriptValue?: boolean, x$?: number, y$?: number) { this.x = x$ ?? 0 this.y = y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { diff --git a/tests/tests/fmt_print_operands/fmt_print_operands.gs.ts b/tests/tests/fmt_print_operands/fmt_print_operands.gs.ts index bf69b23e2..9edd6d575 100644 --- a/tests/tests/fmt_print_operands/fmt_print_operands.gs.ts +++ b/tests/tests/fmt_print_operands/fmt_print_operands.gs.ts @@ -26,7 +26,7 @@ export class slowName { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): slowName { @@ -61,7 +61,7 @@ export class reading { constructor(__goscriptValue?: boolean, Name$?: slowName, Value$?: number) { this.Name = Name$ ?? new slowName(true) this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): reading { @@ -88,7 +88,7 @@ export class tag { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): tag { @@ -125,7 +125,7 @@ export class plain { this.Tag = Tag$ ?? new tag(true) this.Count = Count$ ?? 0 this.Tags = Tags$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): plain { @@ -153,7 +153,7 @@ export class codeError { constructor(__goscriptValue?: boolean, code$?: number) { this.code = code$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): codeError { diff --git a/tests/tests/fmt_print_sync_methods/fmt_print_sync_methods.gs.ts b/tests/tests/fmt_print_sync_methods/fmt_print_sync_methods.gs.ts index d9b291bd7..56277cf89 100644 --- a/tests/tests/fmt_print_sync_methods/fmt_print_sync_methods.gs.ts +++ b/tests/tests/fmt_print_sync_methods/fmt_print_sync_methods.gs.ts @@ -14,7 +14,7 @@ export class point { constructor(__goscriptValue?: boolean, x$?: number, y$?: number) { this.x = x$ ?? 0 this.y = y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { @@ -49,7 +49,7 @@ export class lineError { constructor(__goscriptValue?: boolean, line$?: number, err$?: $.GoError) { this.line = line$ ?? 0 this.err = err$ ?? (null! as $.GoError) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): lineError { diff --git a/tests/tests/fmt_struct_values/fmt_struct_values.gs.ts b/tests/tests/fmt_struct_values/fmt_struct_values.gs.ts index 9a10d6a9b..029cca080 100644 --- a/tests/tests/fmt_struct_values/fmt_struct_values.gs.ts +++ b/tests/tests/fmt_struct_values/fmt_struct_values.gs.ts @@ -14,7 +14,7 @@ export class Inner { constructor(__goscriptValue?: boolean, Ready$?: boolean) { this.Ready = Ready$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Inner { @@ -49,7 +49,7 @@ export class Record { this.Count = Count$ ?? 0 this.name = name$ ?? "" this.Inner = Inner$ ?? new Inner(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Record { @@ -86,7 +86,7 @@ export class Pointers { this.Value = Value$ ?? (null! as $.VarRef | null) this.Next = Next$ ?? (null! as Pointers | $.VarRef | null) this.Dynamic = Dynamic$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pointers { @@ -120,7 +120,7 @@ export class Node { this.Name = Name$ ?? "" this.Parent = Parent$ ?? (null! as Node | $.VarRef | null) this.Kids = Kids$ ?? (null! as $.Slice | null>) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Node { @@ -151,7 +151,7 @@ export class Base { constructor(__goscriptValue?: boolean, Windows$?: $.Slice, Active$?: any) { this.Windows = Windows$ ?? (null! as $.Slice) this.Active = Active$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Base { @@ -181,7 +181,7 @@ export class App { constructor(__goscriptValue?: boolean, Base$?: Base, Name$?: string) { this.Base = Base$ ?? new Base(true, undefined, null! as Win | $.VarRef | null) this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): App { @@ -211,7 +211,7 @@ export class Win { constructor(__goscriptValue?: boolean, App$?: App | $.VarRef | null, Title$?: string) { this.App = App$ ?? (null! as App | $.VarRef | null) this.Title = Title$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Win { diff --git a/tests/tests/for_post_multi_assign/for_post_multi_assign.gs.ts b/tests/tests/for_post_multi_assign/for_post_multi_assign.gs.ts index ff4adbf71..3fccb4419 100644 --- a/tests/tests/for_post_multi_assign/for_post_multi_assign.gs.ts +++ b/tests/tests/for_post_multi_assign/for_post_multi_assign.gs.ts @@ -8,7 +8,7 @@ export class frame { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): frame { @@ -34,7 +34,7 @@ export class iterator { constructor(__goscriptValue?: boolean, idx$?: number) { this.idx = idx$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): iterator { diff --git a/tests/tests/func_value_whole_program/func_value_whole_program.gs.ts b/tests/tests/func_value_whole_program/func_value_whole_program.gs.ts index d8501d345..21fdf256b 100644 --- a/tests/tests/func_value_whole_program/func_value_whole_program.gs.ts +++ b/tests/tests/func_value_whole_program/func_value_whole_program.gs.ts @@ -25,7 +25,7 @@ export class Rule { constructor(__goscriptValue?: boolean, name$?: string, act$?: ((r: Rule | $.VarRef | null, n: number) => number | globalThis.Promise) | null) { this.name = name$ ?? "" this.act = act$ ?? (null! as ((r: Rule | $.VarRef | null, n: number) => number | globalThis.Promise) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Rule { @@ -52,7 +52,7 @@ export class counter { constructor(__goscriptValue?: boolean, total$?: number) { this.total = total$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): counter { @@ -84,7 +84,7 @@ export class chanSource { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): chanSource { @@ -117,7 +117,7 @@ export class fnSource { constructor(__goscriptValue?: boolean, f$?: (() => number | globalThis.Promise) | null) { this.f = f$ ?? (null! as (() => number | globalThis.Promise) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): fnSource { diff --git a/tests/tests/func_var_sync_callback/func_var_sync_callback.gs.ts b/tests/tests/func_var_sync_callback/func_var_sync_callback.gs.ts index 5c84a680a..e5a6f8316 100644 --- a/tests/tests/func_var_sync_callback/func_var_sync_callback.gs.ts +++ b/tests/tests/func_var_sync_callback/func_var_sync_callback.gs.ts @@ -10,7 +10,7 @@ export class matcher { constructor(__goscriptValue?: boolean, match$?: ((r: number) => boolean | globalThis.Promise) | null) { this.match = match$ ?? (null! as ((r: number) => boolean | globalThis.Promise) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): matcher { diff --git a/tests/tests/function_call_result_assignment/function_call_result_assignment.gs.ts b/tests/tests/function_call_result_assignment/function_call_result_assignment.gs.ts index 4ab7366a8..e910938fb 100644 --- a/tests/tests/function_call_result_assignment/function_call_result_assignment.gs.ts +++ b/tests/tests/function_call_result_assignment/function_call_result_assignment.gs.ts @@ -14,7 +14,7 @@ export class MyStruct { this.MyInt = MyInt$ ?? 0 this.MyString = MyString$ ?? "" this.myBool = myBool$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/function_result_async_compatible/function_result_async_compatible.gs.ts b/tests/tests/function_result_async_compatible/function_result_async_compatible.gs.ts index d38410673..424b64cd9 100644 --- a/tests/tests/function_result_async_compatible/function_result_async_compatible.gs.ts +++ b/tests/tests/function_result_async_compatible/function_result_async_compatible.gs.ts @@ -18,7 +18,7 @@ export class box { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): box { diff --git a/tests/tests/function_type_assertion/function_type_assertion.gs.ts b/tests/tests/function_type_assertion/function_type_assertion.gs.ts index 9f6e86a26..fd322cbbe 100644 --- a/tests/tests/function_type_assertion/function_type_assertion.gs.ts +++ b/tests/tests/function_type_assertion/function_type_assertion.gs.ts @@ -14,7 +14,7 @@ export class FuncContainer { constructor(__goscriptValue?: boolean, myFunc$?: any) { this.myFunc = myFunc$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): FuncContainer { diff --git a/tests/tests/generic_cache_pointer_callbacks/generic_cache_pointer_callbacks.gs.ts b/tests/tests/generic_cache_pointer_callbacks/generic_cache_pointer_callbacks.gs.ts index d0da813d9..a45df8c1d 100644 --- a/tests/tests/generic_cache_pointer_callbacks/generic_cache_pointer_callbacks.gs.ts +++ b/tests/tests/generic_cache_pointer_callbacks/generic_cache_pointer_callbacks.gs.ts @@ -8,7 +8,7 @@ export class cache { constructor(__goscriptValue?: boolean, stored$?: any) { this.stored = stored$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): cache { @@ -48,7 +48,7 @@ export class key { constructor(__goscriptValue?: boolean, N$?: number) { this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): key { @@ -74,7 +74,7 @@ export class privateKey { constructor(__goscriptValue?: boolean, D$?: number) { this.D = D$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): privateKey { diff --git a/tests/tests/generic_constrained_slice_clone/generic_constrained_slice_clone.gs.ts b/tests/tests/generic_constrained_slice_clone/generic_constrained_slice_clone.gs.ts index 9f4dd81dc..191c35e30 100644 --- a/tests/tests/generic_constrained_slice_clone/generic_constrained_slice_clone.gs.ts +++ b/tests/tests/generic_constrained_slice_clone/generic_constrained_slice_clone.gs.ts @@ -18,7 +18,7 @@ export class item { constructor(__goscriptValue?: boolean, value$?: string) { this.value = value$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/generic_constructor_field_typeinfo/generic_constructor_field_typeinfo.gs.ts b/tests/tests/generic_constructor_field_typeinfo/generic_constructor_field_typeinfo.gs.ts index 4eb583690..f1ca0255f 100644 --- a/tests/tests/generic_constructor_field_typeinfo/generic_constructor_field_typeinfo.gs.ts +++ b/tests/tests/generic_constructor_field_typeinfo/generic_constructor_field_typeinfo.gs.ts @@ -22,7 +22,7 @@ export class blockType { constructor(__goscriptValue?: boolean, typeID$?: string, _constructor$?: (() => any | globalThis.Promise) | null) { this.typeID = typeID$ ?? "" this._constructor = _constructor$ ?? (null! as (() => any | globalThis.Promise) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): blockType { @@ -56,7 +56,7 @@ export class blockType { export class sampleBlock { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): sampleBlock { diff --git a/tests/tests/generic_cross_package_receiver_args/dep/dep.gs.ts b/tests/tests/generic_cross_package_receiver_args/dep/dep.gs.ts index 809c6534a..6c4d57ced 100644 --- a/tests/tests/generic_cross_package_receiver_args/dep/dep.gs.ts +++ b/tests/tests/generic_cross_package_receiver_args/dep/dep.gs.ts @@ -20,7 +20,7 @@ export class Impl { constructor(__goscriptValue?: boolean, Item$?: any) { this.Item = Item$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Impl { @@ -48,7 +48,7 @@ export class Impl { export class Keyed { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Keyed { @@ -79,7 +79,7 @@ export class Wrapper { constructor(__goscriptValue?: boolean, Keyed$?: Keyed | $.VarRef | null) { this.Keyed = Keyed$ ?? (null! as Keyed | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Wrapper { diff --git a/tests/tests/generic_cross_package_receiver_args/generic_cross_package_receiver_args.gs.ts b/tests/tests/generic_cross_package_receiver_args/generic_cross_package_receiver_args.gs.ts index f10ebe69d..605546c1f 100644 --- a/tests/tests/generic_cross_package_receiver_args/generic_cross_package_receiver_args.gs.ts +++ b/tests/tests/generic_cross_package_receiver_args/generic_cross_package_receiver_args.gs.ts @@ -20,7 +20,7 @@ export class wrapper { constructor(__goscriptValue?: boolean, Impl$?: dep.Impl | $.VarRef | null) { this.Impl = Impl$ ?? (null! as dep.Impl | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): wrapper { diff --git a/tests/tests/generic_embed_mutual_recursion/generic_embed_mutual_recursion.gs.ts b/tests/tests/generic_embed_mutual_recursion/generic_embed_mutual_recursion.gs.ts index fbdd8f146..8bd17bb92 100644 --- a/tests/tests/generic_embed_mutual_recursion/generic_embed_mutual_recursion.gs.ts +++ b/tests/tests/generic_embed_mutual_recursion/generic_embed_mutual_recursion.gs.ts @@ -29,7 +29,7 @@ export class AppBase { constructor(__goscriptValue?: boolean, Windows$?: $.Slice) { this.Windows = Windows$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): AppBase { @@ -76,7 +76,7 @@ export class WindowBase { constructor(__goscriptValue?: boolean, App$?: any, name$?: string) { this.App = App$ ?? (null! as any) this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): WindowBase { @@ -114,7 +114,7 @@ export class MyApp { constructor(__goscriptValue?: boolean, AppBase$?: AppBase) { this.AppBase = AppBase$ ?? $.genericInstance(new AppBase(true), __goscriptStatic1) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyApp { @@ -148,7 +148,7 @@ export class MyWindow { constructor(__goscriptValue?: boolean, WindowBase$?: WindowBase) { this.WindowBase = WindowBase$ ?? $.genericInstance(new WindowBase(true, null! as MyApp | $.VarRef | null), __goscriptStatic3) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyWindow { diff --git a/tests/tests/generic_erased_struct_make/generic_erased_struct_make.gs.ts b/tests/tests/generic_erased_struct_make/generic_erased_struct_make.gs.ts index 18cd7a493..c8fb1a110 100644 --- a/tests/tests/generic_erased_struct_make/generic_erased_struct_make.gs.ts +++ b/tests/tests/generic_erased_struct_make/generic_erased_struct_make.gs.ts @@ -8,7 +8,7 @@ export class queue { constructor(__goscriptValue?: boolean, buf$?: $.Slice) { this.buf = buf$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): queue { diff --git a/tests/tests/generic_func_value_type_args/generic_func_value_type_args.gs.ts b/tests/tests/generic_func_value_type_args/generic_func_value_type_args.gs.ts index 08c5c55d7..2007a84a1 100644 --- a/tests/tests/generic_func_value_type_args/generic_func_value_type_args.gs.ts +++ b/tests/tests/generic_func_value_type_args/generic_func_value_type_args.gs.ts @@ -8,7 +8,7 @@ import "@goscript/slices/index.js" export class Sim { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Sim { @@ -36,7 +36,7 @@ export class Config { constructor(__goscriptValue?: boolean, BaseConfig$?: lib.BaseConfig, Rate$?: number) { this.BaseConfig = BaseConfig$ ?? new lib.BaseConfig(true) this.Rate = Rate$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Config { diff --git a/tests/tests/generic_func_value_type_args/lib/lib.gs.ts b/tests/tests/generic_func_value_type_args/lib/lib.gs.ts index 4bbb53407..4dd870637 100644 --- a/tests/tests/generic_func_value_type_args/lib/lib.gs.ts +++ b/tests/tests/generic_func_value_type_args/lib/lib.gs.ts @@ -21,7 +21,7 @@ export class BaseConfig { constructor(__goscriptValue?: boolean, Name$?: string) { this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): BaseConfig { diff --git a/tests/tests/generic_inferred_struct_zero/generic_inferred_struct_zero.gs.ts b/tests/tests/generic_inferred_struct_zero/generic_inferred_struct_zero.gs.ts index dd771bd15..bc81d0b2b 100644 --- a/tests/tests/generic_inferred_struct_zero/generic_inferred_struct_zero.gs.ts +++ b/tests/tests/generic_inferred_struct_zero/generic_inferred_struct_zero.gs.ts @@ -11,7 +11,7 @@ export class entry { constructor(__goscriptValue?: boolean, key$?: $.Slice, n$?: number) { this.key = key$ ?? (null! as $.Slice) this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): entry { @@ -44,7 +44,7 @@ export class tree { this.less = less$ ?? (null! as ((a: any, b: any) => boolean | globalThis.Promise) | null) this.empty = empty$ ?? (null! as any) this.count = count$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): tree { diff --git a/tests/tests/generic_interface_context_parent/generic_interface_context_parent.gs.ts b/tests/tests/generic_interface_context_parent/generic_interface_context_parent.gs.ts index 0df44f909..b712765c3 100644 --- a/tests/tests/generic_interface_context_parent/generic_interface_context_parent.gs.ts +++ b/tests/tests/generic_interface_context_parent/generic_interface_context_parent.gs.ts @@ -36,7 +36,7 @@ $.registerInterfaceType( export class handler { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): handler { @@ -61,7 +61,7 @@ export class handler { export class genericResolver { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): genericResolver { @@ -94,7 +94,7 @@ export class genericValue { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): genericValue { diff --git a/tests/tests/generic_interface_descriptor_bridge/generic_interface_descriptor_bridge.gs.ts b/tests/tests/generic_interface_descriptor_bridge/generic_interface_descriptor_bridge.gs.ts index 1859248ef..9f090a453 100644 --- a/tests/tests/generic_interface_descriptor_bridge/generic_interface_descriptor_bridge.gs.ts +++ b/tests/tests/generic_interface_descriptor_bridge/generic_interface_descriptor_bridge.gs.ts @@ -28,7 +28,7 @@ $.registerInterfaceType( export class genericBox { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): genericBox { @@ -63,7 +63,7 @@ export class intBox { constructor(__goscriptValue?: boolean, id$?: number) { this.id = id$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): intBox { diff --git a/tests/tests/generic_interface_embedded_method_calls/generic_interface_embedded_method_calls.gs.ts b/tests/tests/generic_interface_embedded_method_calls/generic_interface_embedded_method_calls.gs.ts index 8d5fb3da2..8df12f6a8 100644 --- a/tests/tests/generic_interface_embedded_method_calls/generic_interface_embedded_method_calls.gs.ts +++ b/tests/tests/generic_interface_embedded_method_calls/generic_interface_embedded_method_calls.gs.ts @@ -32,7 +32,7 @@ export class impl { constructor(__goscriptValue?: boolean, value$?: any, other$?: any) { this.value = value$ ?? (null! as any) this.other = other$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): impl { diff --git a/tests/tests/generic_interface_type_name/generic_interface_type_name.gs.ts b/tests/tests/generic_interface_type_name/generic_interface_type_name.gs.ts index 9aaa7c671..59c4d2696 100644 --- a/tests/tests/generic_interface_type_name/generic_interface_type_name.gs.ts +++ b/tests/tests/generic_interface_type_name/generic_interface_type_name.gs.ts @@ -29,7 +29,7 @@ export class label { constructor(__goscriptValue?: boolean, text$?: string) { this.text = text$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): label { @@ -60,7 +60,7 @@ export class icon { constructor(__goscriptValue?: boolean, size$?: number) { this.size = size$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): icon { diff --git a/tests/tests/generic_new_struct_pointer/generic_new_struct_pointer.gs.ts b/tests/tests/generic_new_struct_pointer/generic_new_struct_pointer.gs.ts index f5ab0e6be..a19e3a601 100644 --- a/tests/tests/generic_new_struct_pointer/generic_new_struct_pointer.gs.ts +++ b/tests/tests/generic_new_struct_pointer/generic_new_struct_pointer.gs.ts @@ -22,7 +22,7 @@ export class Base { constructor(__goscriptValue?: boolean, name$?: string, inits$?: number) { this.name = name$ ?? "" this.inits = inits$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Base { @@ -62,7 +62,7 @@ export class Widget { constructor(__goscriptValue?: boolean, Base$?: Base, Text$?: string) { this.Base = Base$ ?? new Base(true) this.Text = Text$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Widget { diff --git a/tests/tests/generic_pointer_constraint_method_dispatch/generic_pointer_constraint_method_dispatch.gs.ts b/tests/tests/generic_pointer_constraint_method_dispatch/generic_pointer_constraint_method_dispatch.gs.ts index a7a047c8e..b1be6c347 100644 --- a/tests/tests/generic_pointer_constraint_method_dispatch/generic_pointer_constraint_method_dispatch.gs.ts +++ b/tests/tests/generic_pointer_constraint_method_dispatch/generic_pointer_constraint_method_dispatch.gs.ts @@ -46,7 +46,7 @@ export class pairingOffer { constructor(__goscriptValue?: boolean, Note$?: string) { this.Note = Note$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pairingOffer { diff --git a/tests/tests/generic_pointer_equal/generic_pointer_equal.gs.ts b/tests/tests/generic_pointer_equal/generic_pointer_equal.gs.ts index 529174ddf..0bdad707d 100644 --- a/tests/tests/generic_pointer_equal/generic_pointer_equal.gs.ts +++ b/tests/tests/generic_pointer_equal/generic_pointer_equal.gs.ts @@ -15,7 +15,7 @@ export class node { this.name = name$ ?? "" this.parent = parent$ ?? (null! as node | $.VarRef | null) this.children = children$ ?? (null! as $.Slice | null>) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): node { @@ -46,7 +46,7 @@ export class point { constructor(__goscriptValue?: boolean, x$?: number, y$?: number) { this.x = x$ ?? 0 this.y = y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { @@ -76,7 +76,7 @@ export class pair { constructor(__goscriptValue?: boolean, a$?: point, b$?: point) { this.a = a$ ?? new point(true) this.b = b$ ?? new point(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pair { diff --git a/tests/tests/generic_pool_pointer_assert/generic_pool_pointer_assert.gs.ts b/tests/tests/generic_pool_pointer_assert/generic_pool_pointer_assert.gs.ts index 23c195497..43338d9bf 100644 --- a/tests/tests/generic_pool_pointer_assert/generic_pool_pointer_assert.gs.ts +++ b/tests/tests/generic_pool_pointer_assert/generic_pool_pointer_assert.gs.ts @@ -13,7 +13,7 @@ export class interval { constructor(__goscriptValue?: boolean, start$?: number, end$?: number) { this.start = start$ ?? 0 this.end = end$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): interval { @@ -40,7 +40,7 @@ export class sorter { constructor(__goscriptValue?: boolean, gaps$?: list.List | $.VarRef | null) { this.gaps = gaps$ ?? (null! as list.List | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): sorter { diff --git a/tests/tests/generic_pool_pointer_assert/list/list.gs.ts b/tests/tests/generic_pool_pointer_assert/list/list.gs.ts index 72e52e562..dffd7a6a3 100644 --- a/tests/tests/generic_pool_pointer_assert/list/list.gs.ts +++ b/tests/tests/generic_pool_pointer_assert/list/list.gs.ts @@ -20,7 +20,7 @@ export class Element { this.prev = prev$ ?? (null! as Element | $.VarRef | null) this.list = list$ ?? (null! as List | $.VarRef | null) this.Value = Value$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Element { @@ -84,7 +84,7 @@ export class List { this.root = root$ ?? $.genericInstance(new Element(true, undefined, undefined, undefined, null), () => [{List: (receiver: any) => $.pointerValue(receiver).List({[$.genericTypeArgsMarker]: $.genericTypeArgsBrand, T: { type: { kind: $.TypeKind.Interface, methods: [] }, zero: () => null }}), Next: (receiver: any) => $.pointerValue(receiver).Next({[$.genericTypeArgsMarker]: $.genericTypeArgsBrand, T: { type: { kind: $.TypeKind.Interface, methods: [] }, zero: () => null }}), Prev: (receiver: any) => $.pointerValue(receiver).Prev({[$.genericTypeArgsMarker]: $.genericTypeArgsBrand, T: { type: { kind: $.TypeKind.Interface, methods: [] }, zero: () => null }})}, [$.methodSignature("List", [], [/* @__PURE__ */ $.pointerType("list.List")], true, false), $.methodSignature("Next", [], [/* @__PURE__ */ $.pointerType("list.Element")], true, false), $.methodSignature("Prev", [], [/* @__PURE__ */ $.pointerType("list.Element")], true, false)]]) this.len = len$ ?? 0 this.pool = pool$ ?? (null! as sync.Pool | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): List { diff --git a/tests/tests/generic_promoted_method_type_arg/generic_promoted_method_type_arg.gs.ts b/tests/tests/generic_promoted_method_type_arg/generic_promoted_method_type_arg.gs.ts index 3920f475a..d1cb6778a 100644 --- a/tests/tests/generic_promoted_method_type_arg/generic_promoted_method_type_arg.gs.ts +++ b/tests/tests/generic_promoted_method_type_arg/generic_promoted_method_type_arg.gs.ts @@ -24,7 +24,7 @@ export class Base { constructor(__goscriptValue?: boolean, App$?: any, flags$?: Flags) { this.App = App$ ?? (null! as any) this.flags = flags$ ?? 0n - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Base { @@ -62,7 +62,7 @@ export class App { constructor(__goscriptValue?: boolean, Name$?: string) { this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): App { @@ -91,7 +91,7 @@ export class Window { constructor(__goscriptValue?: boolean, Base$?: Base, Title$?: string) { this.Base = Base$ ?? $.genericInstance(new Base(true, null! as App | $.VarRef | null), __goscriptStatic1) this.Title = Title$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Window { @@ -129,7 +129,7 @@ export class Single { constructor(__goscriptValue?: boolean, Base$?: Base, Count$?: number) { this.Base = Base$ ?? $.genericInstance(new Base(true, null), () => [{Is: (receiver: any, ...args: any[]) => $.pointerValue(receiver).Is({[$.genericTypeArgsMarker]: $.genericTypeArgsBrand, A: { type: { kind: $.TypeKind.Interface, methods: [] }, zero: () => null }}, ...$.stripGenericTypeArgs(args)), Set: (receiver: any, ...args: any[]) => $.pointerValue(receiver).Set({[$.genericTypeArgsMarker]: $.genericTypeArgsBrand, A: { type: { kind: $.TypeKind.Interface, methods: [] }, zero: () => null }}, ...$.stripGenericTypeArgs(args))}, [$.methodSignature("Is", [/* @__PURE__ */ $.basicType("int64", "main.Flags")], [/* @__PURE__ */ $.basicType("bool")], true, false), $.methodSignature("Set", [/* @__PURE__ */ $.basicType("int64", "main.Flags")], [], true, false)]]) this.Count = Count$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Single { diff --git a/tests/tests/generic_promoted_plain_method/generic_promoted_plain_method.gs.ts b/tests/tests/generic_promoted_plain_method/generic_promoted_plain_method.gs.ts index 3990e9015..2e11cf9c3 100644 --- a/tests/tests/generic_promoted_plain_method/generic_promoted_plain_method.gs.ts +++ b/tests/tests/generic_promoted_plain_method/generic_promoted_plain_method.gs.ts @@ -28,7 +28,7 @@ export class Meta { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Meta { @@ -59,7 +59,7 @@ export class Inner { constructor(__goscriptValue?: boolean, v$?: any) { this.v = v$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Inner { @@ -96,7 +96,7 @@ export class Outer { this.Meta = Meta$ ?? new Meta(true) this.Inner = Inner$ ?? (null! as Inner | $.VarRef | null) this.v = v$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Outer { diff --git a/tests/tests/generic_receiver_method_calls/generic_receiver_method_calls.gs.ts b/tests/tests/generic_receiver_method_calls/generic_receiver_method_calls.gs.ts index 546b06b14..0507556c9 100644 --- a/tests/tests/generic_receiver_method_calls/generic_receiver_method_calls.gs.ts +++ b/tests/tests/generic_receiver_method_calls/generic_receiver_method_calls.gs.ts @@ -18,7 +18,7 @@ export class box { constructor(__goscriptValue?: boolean, value$?: any) { this.value = value$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): box { @@ -49,7 +49,7 @@ export class holder { constructor(__goscriptValue?: boolean, box$?: box) { this.box = box$ ?? $.genericInstance(new box(true, null), () => [{Value: (receiver: any) => $.pointerValue(receiver).Value({[$.genericTypeArgsMarker]: $.genericTypeArgsBrand, T: { type: { kind: $.TypeKind.Interface, methods: [] }, zero: () => null }})}, [$.methodSignature("Value", [], [{ kind: $.TypeKind.Interface, methods: [] }], true, false)]]) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { diff --git a/tests/tests/generic_receiver_type_param_method/generic_receiver_type_param_method.gs.ts b/tests/tests/generic_receiver_type_param_method/generic_receiver_type_param_method.gs.ts index b42498e5b..132d19625 100644 --- a/tests/tests/generic_receiver_type_param_method/generic_receiver_type_param_method.gs.ts +++ b/tests/tests/generic_receiver_type_param_method/generic_receiver_type_param_method.gs.ts @@ -15,7 +15,7 @@ $.registerInterfaceType( export class nistCurve { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): nistCurve { @@ -51,7 +51,7 @@ export class point { constructor(__goscriptValue?: boolean, N$?: number) { this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { diff --git a/tests/tests/generic_struct_clone/generic_struct_clone.gs.ts b/tests/tests/generic_struct_clone/generic_struct_clone.gs.ts index 175401857..aaf5dcfff 100644 --- a/tests/tests/generic_struct_clone/generic_struct_clone.gs.ts +++ b/tests/tests/generic_struct_clone/generic_struct_clone.gs.ts @@ -11,7 +11,7 @@ export class unit { constructor(__goscriptValue?: boolean, V$?: number, U$?: string) { this.V = V$ ?? 0 this.U = U$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): unit { @@ -47,7 +47,7 @@ export class sides { this.Right = Right$ ?? (null! as any) this.Bottom = Bottom$ ?? (null! as any) this.Left = Left$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): sides { @@ -92,7 +92,7 @@ export class values { constructor(__goscriptValue?: boolean, sides$?: sides, Name$?: string) { this.sides = sides$ ?? $.genericInstance(new sides(true, new unit(true), new unit(true), new unit(true), new unit(true)), __goscriptStatic1) this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): values { @@ -126,7 +126,7 @@ export class pair { constructor(__goscriptValue?: boolean, Key$?: any, Val$?: any) { this.Key = Key$ ?? (null! as any) this.Val = Val$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pair { diff --git a/tests/tests/generic_struct_field_copy/generic_struct_field_copy.gs.ts b/tests/tests/generic_struct_field_copy/generic_struct_field_copy.gs.ts index 583332bd9..63d627974 100644 --- a/tests/tests/generic_struct_field_copy/generic_struct_field_copy.gs.ts +++ b/tests/tests/generic_struct_field_copy/generic_struct_field_copy.gs.ts @@ -11,7 +11,7 @@ export class Value { constructor(__goscriptValue?: boolean, V$?: number, Unit$?: number) { this.V = V$ ?? 0 this.Unit = Unit$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Value { @@ -47,7 +47,7 @@ export class Sides { this.Right = Right$ ?? (null! as any) this.Bottom = Bottom$ ?? (null! as any) this.Left = Left$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Sides { @@ -76,7 +76,7 @@ export class Values { constructor(__goscriptValue?: boolean, Sides$?: Sides) { this.Sides = Sides$ ?? new Sides(true, new Value(true), new Value(true), new Value(true), new Value(true)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Values { @@ -105,7 +105,7 @@ export class Pair { constructor(__goscriptValue?: boolean, Key$?: any, Val$?: any) { this.Key = Key$ ?? (null! as any) this.Val = Val$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pair { @@ -135,7 +135,7 @@ export class withClone { constructor(init?: Partial<{clone?: (() => number | globalThis.Promise) | null, n?: number}>, __goscriptValue?: boolean) { this.clone = init?.clone ?? (null! as (() => number | globalThis.Promise) | null) this.n = init?.n ?? (0 as number) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public __goscriptClone(): withClone { diff --git a/tests/tests/generic_struct_field_zero/generic_struct_field_zero.gs.ts b/tests/tests/generic_struct_field_zero/generic_struct_field_zero.gs.ts index fa6a5976b..d3def4205 100644 --- a/tests/tests/generic_struct_field_zero/generic_struct_field_zero.gs.ts +++ b/tests/tests/generic_struct_field_zero/generic_struct_field_zero.gs.ts @@ -8,7 +8,7 @@ export class box { constructor(__goscriptValue?: boolean, Value$?: any) { this.Value = Value$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): box { @@ -34,7 +34,7 @@ export class point { constructor(__goscriptValue?: boolean, X$?: number) { this.X = X$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { diff --git a/tests/tests/generic_struct_slice_zero/generic_struct_slice_zero.gs.ts b/tests/tests/generic_struct_slice_zero/generic_struct_slice_zero.gs.ts index c4604b993..3bd5a3abe 100644 --- a/tests/tests/generic_struct_slice_zero/generic_struct_slice_zero.gs.ts +++ b/tests/tests/generic_struct_slice_zero/generic_struct_slice_zero.gs.ts @@ -9,7 +9,7 @@ export class item { constructor(__goscriptValue?: boolean, Text$?: string) { this.Text = Text$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { @@ -35,7 +35,7 @@ export class arena { constructor(__goscriptValue?: boolean, data$?: $.Slice) { this.data = data$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): arena { diff --git a/tests/tests/generic_struct_value_copy/generic_struct_value_copy.gs.ts b/tests/tests/generic_struct_value_copy/generic_struct_value_copy.gs.ts index d9e373102..a8a46e275 100644 --- a/tests/tests/generic_struct_value_copy/generic_struct_value_copy.gs.ts +++ b/tests/tests/generic_struct_value_copy/generic_struct_value_copy.gs.ts @@ -11,7 +11,7 @@ export class Value { constructor(__goscriptValue?: boolean, V$?: number, U$?: number) { this.V = V$ ?? 0 this.U = U$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Value { @@ -52,7 +52,7 @@ export class Sides { this.Right = Right$ ?? (null! as any) this.Bottom = Bottom$ ?? (null! as any) this.Left = Left$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Sides { @@ -100,7 +100,7 @@ export class box { constructor(__goscriptValue?: boolean, A$?: any, B$?: any) { this.A = A$ ?? (null! as any) this.B = B$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): box { diff --git a/tests/tests/generic_type_arg_other_file/descriptor.gs.ts b/tests/tests/generic_type_arg_other_file/descriptor.gs.ts index dbbf32eb6..3f396946c 100644 --- a/tests/tests/generic_type_arg_other_file/descriptor.gs.ts +++ b/tests/tests/generic_type_arg_other_file/descriptor.gs.ts @@ -8,7 +8,7 @@ export class descriptor { constructor(__goscriptValue?: boolean, Label$?: string) { this.Label = Label$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): descriptor { diff --git a/tests/tests/generic_type_param_numeric_interface/generic_type_param_numeric_interface.gs.ts b/tests/tests/generic_type_param_numeric_interface/generic_type_param_numeric_interface.gs.ts index 6e04aed86..cbc9f00a0 100644 --- a/tests/tests/generic_type_param_numeric_interface/generic_type_param_numeric_interface.gs.ts +++ b/tests/tests/generic_type_param_numeric_interface/generic_type_param_numeric_interface.gs.ts @@ -11,7 +11,7 @@ export class Base { constructor(__goscriptValue?: boolean, Values$?: $.Slice) { this.Values = Values$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Base { diff --git a/tests/tests/generic_type_switch_type_param/generic_type_switch_type_param.gs.ts b/tests/tests/generic_type_switch_type_param/generic_type_switch_type_param.gs.ts index 11d4e306f..a88832c4b 100644 --- a/tests/tests/generic_type_switch_type_param/generic_type_switch_type_param.gs.ts +++ b/tests/tests/generic_type_switch_type_param/generic_type_switch_type_param.gs.ts @@ -12,7 +12,7 @@ export class Value { constructor(__goscriptValue?: boolean, Val$?: number, Unit$?: string) { this.Val = Val$ ?? 0 this.Unit = Unit$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Value { @@ -47,7 +47,7 @@ export class Sides { constructor(__goscriptValue?: boolean, Top$?: any, Right$?: any) { this.Top = Top$ ?? (null! as any) this.Right = Right$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Sides { diff --git a/tests/tests/generics_basic/generics_basic.gs.ts b/tests/tests/generics_basic/generics_basic.gs.ts index 23a551e70..6f2012a4f 100644 --- a/tests/tests/generics_basic/generics_basic.gs.ts +++ b/tests/tests/generics_basic/generics_basic.gs.ts @@ -30,7 +30,7 @@ export class Stack { constructor(__goscriptValue?: boolean, items$?: $.Slice) { this.items = items$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Stack { @@ -79,7 +79,7 @@ export class Item { constructor(__goscriptValue?: boolean, Name$?: string) { this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Item { @@ -113,7 +113,7 @@ export class Mapper { constructor(__goscriptValue?: boolean, values$?: globalThis.Map | null) { this.values = values$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Mapper { @@ -153,7 +153,7 @@ export class Pair { constructor(__goscriptValue?: boolean, First$?: any, Second$?: any) { this.First = First$ ?? (null! as any) this.Second = Second$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pair { diff --git a/tests/tests/goroutines/goroutines.gs.ts b/tests/tests/goroutines/goroutines.gs.ts index 504591a42..85cfa45db 100644 --- a/tests/tests/goroutines/goroutines.gs.ts +++ b/tests/tests/goroutines/goroutines.gs.ts @@ -11,7 +11,7 @@ export class Message { constructor(__goscriptValue?: boolean, priority$?: number, text$?: string) { this.priority = priority$ ?? 0 this.text = text$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Message { diff --git a/tests/tests/goroutines_selector/goroutines_selector.gs.ts b/tests/tests/goroutines_selector/goroutines_selector.gs.ts index beeca2c79..d9df1a0c5 100644 --- a/tests/tests/goroutines_selector/goroutines_selector.gs.ts +++ b/tests/tests/goroutines_selector/goroutines_selector.gs.ts @@ -8,7 +8,7 @@ export class Foo { constructor(__goscriptValue?: boolean, done$?: $.Channel | null) { this.done = done$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Foo { diff --git a/tests/tests/goto_state_machine/goto_state_machine.gs.ts b/tests/tests/goto_state_machine/goto_state_machine.gs.ts index 3f90daa7a..5975dd59b 100644 --- a/tests/tests/goto_state_machine/goto_state_machine.gs.ts +++ b/tests/tests/goto_state_machine/goto_state_machine.gs.ts @@ -14,7 +14,7 @@ export class scanner { this.data = data$ ?? "" this.pos = pos$ ?? 0 this.done = done$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): scanner { diff --git a/tests/tests/hidden_embedded_method_field/hidden_embedded_method_field.gs.ts b/tests/tests/hidden_embedded_method_field/hidden_embedded_method_field.gs.ts index 9c5ccf965..859bb0d41 100644 --- a/tests/tests/hidden_embedded_method_field/hidden_embedded_method_field.gs.ts +++ b/tests/tests/hidden_embedded_method_field/hidden_embedded_method_field.gs.ts @@ -5,7 +5,7 @@ import * as $ from "@goscript/builtin/index.js" export class embedded { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): embedded { @@ -37,7 +37,7 @@ export class holder { constructor(__goscriptValue?: boolean, Database$?: string, embedded$?: embedded) { this.Database = Database$ ?? "" this.embedded = embedded$ ?? new embedded(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { diff --git a/tests/tests/implicit_type_imports/main.gs.ts b/tests/tests/implicit_type_imports/main.gs.ts index f6964f66a..fcbae915c 100644 --- a/tests/tests/implicit_type_imports/main.gs.ts +++ b/tests/tests/implicit_type_imports/main.gs.ts @@ -10,7 +10,7 @@ import "./stream.gs.ts" export class localReadWriteCloser { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): localReadWriteCloser { diff --git a/tests/tests/implicit_type_imports/server.gs.ts b/tests/tests/implicit_type_imports/server.gs.ts index 712d1b9a0..4a1aa4489 100644 --- a/tests/tests/implicit_type_imports/server.gs.ts +++ b/tests/tests/implicit_type_imports/server.gs.ts @@ -7,7 +7,7 @@ import "@goscript/io/index.js" export class Server { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Server { diff --git a/tests/tests/import_alias_shadowed_by_local/main.gs.ts b/tests/tests/import_alias_shadowed_by_local/main.gs.ts index 45b63582c..d1e1b94b5 100644 --- a/tests/tests/import_alias_shadowed_by_local/main.gs.ts +++ b/tests/tests/import_alias_shadowed_by_local/main.gs.ts @@ -9,7 +9,7 @@ export class local { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): local { diff --git a/tests/tests/import_alias_type_assert_shadow/dep/dep.gs.ts b/tests/tests/import_alias_type_assert_shadow/dep/dep.gs.ts index eec27c81c..14b03dbf3 100644 --- a/tests/tests/import_alias_type_assert_shadow/dep/dep.gs.ts +++ b/tests/tests/import_alias_type_assert_shadow/dep/dep.gs.ts @@ -10,7 +10,7 @@ export class Thing { constructor(__goscriptValue?: boolean, Value$?: number) { this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Thing { diff --git a/tests/tests/import_type_methods/import_type_methods.gs.ts b/tests/tests/import_type_methods/import_type_methods.gs.ts index 02a631343..1d9c9f0df 100644 --- a/tests/tests/import_type_methods/import_type_methods.gs.ts +++ b/tests/tests/import_type_methods/import_type_methods.gs.ts @@ -9,7 +9,7 @@ export class parser { constructor(__goscriptValue?: boolean, errors$?: errlist.ErrorList) { this.errors = errors$ ?? (null! as errlist.ErrorList) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): parser { diff --git a/tests/tests/import_unexported_inferred_type/dep/dep.gs.ts b/tests/tests/import_unexported_inferred_type/dep/dep.gs.ts index 7a566fd9a..69d575449 100644 --- a/tests/tests/import_unexported_inferred_type/dep/dep.gs.ts +++ b/tests/tests/import_unexported_inferred_type/dep/dep.gs.ts @@ -7,7 +7,7 @@ $.registerTypePackagePath("github.com/s4wave/goscript/tests/tests/import_unexpor export class hiddenError { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): hiddenError { diff --git a/tests/tests/imported_generic_function/helper/helper.gs.ts b/tests/tests/imported_generic_function/helper/helper.gs.ts index fbc396680..618838216 100644 --- a/tests/tests/imported_generic_function/helper/helper.gs.ts +++ b/tests/tests/imported_generic_function/helper/helper.gs.ts @@ -20,7 +20,7 @@ export class Box { constructor(__goscriptValue?: boolean, Value$?: any) { this.Value = Value$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Box { @@ -46,7 +46,7 @@ export class IntValue { constructor(__goscriptValue?: boolean, N$?: number) { this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): IntValue { diff --git a/tests/tests/imported_interface_field/imported_interface_field.gs.ts b/tests/tests/imported_interface_field/imported_interface_field.gs.ts index de5084c18..89289c33d 100644 --- a/tests/tests/imported_interface_field/imported_interface_field.gs.ts +++ b/tests/tests/imported_interface_field/imported_interface_field.gs.ts @@ -10,7 +10,7 @@ export class holder { constructor(__goscriptValue?: boolean, w$?: io.Writer | null) { this.w = w$ ?? (null! as io.Writer | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { diff --git a/tests/tests/imul_32bit/imul_32bit.gs.ts b/tests/tests/imul_32bit/imul_32bit.gs.ts index cd9b05fb5..dd047da9a 100644 --- a/tests/tests/imul_32bit/imul_32bit.gs.ts +++ b/tests/tests/imul_32bit/imul_32bit.gs.ts @@ -17,7 +17,7 @@ export class multiplyCase { this.y = y$ ?? 0 this.unsigned = unsigned$ ?? 0 this.signed = signed$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): multiplyCase { diff --git a/tests/tests/incdec_wrap_round/incdec_wrap_round.gs.ts b/tests/tests/incdec_wrap_round/incdec_wrap_round.gs.ts index fd3018bcb..c0f04f5d8 100644 --- a/tests/tests/incdec_wrap_round/incdec_wrap_round.gs.ts +++ b/tests/tests/incdec_wrap_round/incdec_wrap_round.gs.ts @@ -14,7 +14,7 @@ export class counters { this.I8 = I8$ ?? 0 this.U16 = U16$ ?? 0 this.F = F$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): counters { diff --git a/tests/tests/indirect_circular_deps/indirect_circular_deps.gs.ts b/tests/tests/indirect_circular_deps/indirect_circular_deps.gs.ts index 88f54285b..f6d4f039c 100644 --- a/tests/tests/indirect_circular_deps/indirect_circular_deps.gs.ts +++ b/tests/tests/indirect_circular_deps/indirect_circular_deps.gs.ts @@ -8,7 +8,7 @@ export class A { constructor(__goscriptValue?: boolean, BB$?: $.Slice) { this.BB = BB$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): A { @@ -34,7 +34,7 @@ export class B { constructor(__goscriptValue?: boolean, AA$?: $.Slice) { this.AA = AA$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): B { diff --git a/tests/tests/init_after_package_decls/field.gs.ts b/tests/tests/init_after_package_decls/field.gs.ts index 9d80e4a6d..7f4c483ed 100644 --- a/tests/tests/init_after_package_decls/field.gs.ts +++ b/tests/tests/init_after_package_decls/field.gs.ts @@ -10,7 +10,7 @@ export class Field { constructor(__goscriptValue?: boolean, Name$?: string) { this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Field { diff --git a/tests/tests/init_after_package_decls/type.gs.ts b/tests/tests/init_after_package_decls/type.gs.ts index 8a8704fb6..386fb9a17 100644 --- a/tests/tests/init_after_package_decls/type.gs.ts +++ b/tests/tests/init_after_package_decls/type.gs.ts @@ -13,7 +13,7 @@ export class Type { constructor(__goscriptValue?: boolean, Name$?: string, Fields$?: $.Slice<__goscript_field.Field>) { this.Name = Name$ ?? "" this.Fields = Fields$ ?? (null! as $.Slice<__goscript_field.Field>) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Type { diff --git a/tests/tests/inline_interface_type_assertion/inline_interface_type_assertion.gs.ts b/tests/tests/inline_interface_type_assertion/inline_interface_type_assertion.gs.ts index 6793de1b5..942d5570a 100644 --- a/tests/tests/inline_interface_type_assertion/inline_interface_type_assertion.gs.ts +++ b/tests/tests/inline_interface_type_assertion/inline_interface_type_assertion.gs.ts @@ -15,7 +15,7 @@ $.registerInterfaceType( export class Greeter { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Greeter { @@ -42,7 +42,7 @@ export class Greeter { export class MyStringer { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStringer { diff --git a/tests/tests/interface_async_callback_param/interface_async_callback_param.gs.ts b/tests/tests/interface_async_callback_param/interface_async_callback_param.gs.ts index 870ab5284..a3fb9e2f3 100644 --- a/tests/tests/interface_async_callback_param/interface_async_callback_param.gs.ts +++ b/tests/tests/interface_async_callback_param/interface_async_callback_param.gs.ts @@ -17,7 +17,7 @@ $.registerInterfaceType( export class listScanner { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): listScanner { diff --git a/tests/tests/interface_async_method_call/interface_async_method_call.gs.ts b/tests/tests/interface_async_method_call/interface_async_method_call.gs.ts index 8b7ff3787..fb3118f04 100644 --- a/tests/tests/interface_async_method_call/interface_async_method_call.gs.ts +++ b/tests/tests/interface_async_method_call/interface_async_method_call.gs.ts @@ -29,7 +29,7 @@ export class ChannelProcessor { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): ChannelProcessor { @@ -70,7 +70,7 @@ export class SimpleProcessor { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): SimpleProcessor { @@ -110,7 +110,7 @@ export class GenericChannelStore { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null, value$?: any) { this.ch = ch$ ?? (null! as $.Channel | null) this.value = value$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): GenericChannelStore { diff --git a/tests/tests/interface_call_result_imports/dep1/dep1.gs.ts b/tests/tests/interface_call_result_imports/dep1/dep1.gs.ts index c4b3b3318..a0d632ce2 100644 --- a/tests/tests/interface_call_result_imports/dep1/dep1.gs.ts +++ b/tests/tests/interface_call_result_imports/dep1/dep1.gs.ts @@ -9,7 +9,7 @@ $.registerTypePackagePath("github.com/s4wave/goscript/tests/tests/interface_call export class maker { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): maker { diff --git a/tests/tests/interface_copied_method_call/interface_copied_method_call.gs.ts b/tests/tests/interface_copied_method_call/interface_copied_method_call.gs.ts index 23192e17a..bb3bae6ae 100644 --- a/tests/tests/interface_copied_method_call/interface_copied_method_call.gs.ts +++ b/tests/tests/interface_copied_method_call/interface_copied_method_call.gs.ts @@ -15,7 +15,7 @@ $.registerInterfaceType( export class task { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): task { diff --git a/tests/tests/interface_define_reassign_nullable/interface_define_reassign_nullable.gs.ts b/tests/tests/interface_define_reassign_nullable/interface_define_reassign_nullable.gs.ts index ae9f95082..7e41569cd 100644 --- a/tests/tests/interface_define_reassign_nullable/interface_define_reassign_nullable.gs.ts +++ b/tests/tests/interface_define_reassign_nullable/interface_define_reassign_nullable.gs.ts @@ -19,7 +19,7 @@ export class Square { constructor(__goscriptValue?: boolean, Side$?: number) { this.Side = Side$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Square { diff --git a/tests/tests/interface_embedded_parent_async/main.gs.ts b/tests/tests/interface_embedded_parent_async/main.gs.ts index e413a86f7..bcf90f6da 100644 --- a/tests/tests/interface_embedded_parent_async/main.gs.ts +++ b/tests/tests/interface_embedded_parent_async/main.gs.ts @@ -17,7 +17,7 @@ $.registerInterfaceType( export class impl { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): impl { diff --git a/tests/tests/interface_multi_param_return/interface_multi_param_return.gs.ts b/tests/tests/interface_multi_param_return/interface_multi_param_return.gs.ts index 4bb557701..f2bacc503 100644 --- a/tests/tests/interface_multi_param_return/interface_multi_param_return.gs.ts +++ b/tests/tests/interface_multi_param_return/interface_multi_param_return.gs.ts @@ -15,7 +15,7 @@ $.registerInterfaceType( export class MyProcessor { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyProcessor { diff --git a/tests/tests/interface_override_async_method/interface_override_async_method.gs.ts b/tests/tests/interface_override_async_method/interface_override_async_method.gs.ts index 89f0f19d5..d2a9414ab 100644 --- a/tests/tests/interface_override_async_method/interface_override_async_method.gs.ts +++ b/tests/tests/interface_override_async_method/interface_override_async_method.gs.ts @@ -10,7 +10,7 @@ export class asyncReader { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): asyncReader { diff --git a/tests/tests/interface_override_sync_async/interface_override_sync_async.gs.ts b/tests/tests/interface_override_sync_async/interface_override_sync_async.gs.ts index 3ce5b5e3f..830aaffc4 100644 --- a/tests/tests/interface_override_sync_async/interface_override_sync_async.gs.ts +++ b/tests/tests/interface_override_sync_async/interface_override_sync_async.gs.ts @@ -11,7 +11,7 @@ export class slowName { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): slowName { diff --git a/tests/tests/interface_pointer_assignment/interface_pointer_assignment.gs.ts b/tests/tests/interface_pointer_assignment/interface_pointer_assignment.gs.ts index c271cdadd..00198ffc3 100644 --- a/tests/tests/interface_pointer_assignment/interface_pointer_assignment.gs.ts +++ b/tests/tests/interface_pointer_assignment/interface_pointer_assignment.gs.ts @@ -8,7 +8,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, Value$?: number) { this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/interface_pointer_method_set/interface_pointer_method_set.gs.ts b/tests/tests/interface_pointer_method_set/interface_pointer_method_set.gs.ts index a66eba5ec..12376d723 100644 --- a/tests/tests/interface_pointer_method_set/interface_pointer_method_set.gs.ts +++ b/tests/tests/interface_pointer_method_set/interface_pointer_method_set.gs.ts @@ -43,7 +43,7 @@ export class T { constructor(__goscriptValue?: boolean, v$?: number) { this.v = v$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): T { @@ -79,7 +79,7 @@ export class ByValue { constructor(__goscriptValue?: boolean, T$?: T) { this.T = T$ ?? new T(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): ByValue { @@ -113,7 +113,7 @@ export class ByPointer { constructor(__goscriptValue?: boolean, T$?: T | $.VarRef | null) { this.T = T$ ?? (null! as T | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): ByPointer { diff --git a/tests/tests/interface_slice_index_short_decl/interface_slice_index_short_decl.gs.ts b/tests/tests/interface_slice_index_short_decl/interface_slice_index_short_decl.gs.ts index 232703049..bafffc449 100644 --- a/tests/tests/interface_slice_index_short_decl/interface_slice_index_short_decl.gs.ts +++ b/tests/tests/interface_slice_index_short_decl/interface_slice_index_short_decl.gs.ts @@ -54,7 +54,7 @@ export class Action { constructor(__goscriptValue?: boolean, Result$?: number, Filter$?: globalThis.Map | null) { this.Result = Result$ ?? 0 this.Filter = Filter$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Action { diff --git a/tests/tests/interface_struct_value_box/interface_struct_value_box.gs.ts b/tests/tests/interface_struct_value_box/interface_struct_value_box.gs.ts index 60b50bccc..9ff3ad51d 100644 --- a/tests/tests/interface_struct_value_box/interface_struct_value_box.gs.ts +++ b/tests/tests/interface_struct_value_box/interface_struct_value_box.gs.ts @@ -21,7 +21,7 @@ export class Vec { constructor(__goscriptValue?: boolean, X$?: number, Y$?: number) { this.X = X$ ?? 0 this.Y = Y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Vec { @@ -59,7 +59,7 @@ export class Named { this.Name = Name$ ?? "" this.Tags = Tags$ ?? (null! as $.Slice) this.Next = Next$ ?? (null! as Named | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Named { @@ -90,7 +90,7 @@ export class Outer { constructor(__goscriptValue?: boolean, In$?: Vec, N$?: number) { this.In = In$ ?? new Vec(true) this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Outer { @@ -120,7 +120,7 @@ export class Celsius { constructor(__goscriptValue?: boolean, X$?: number, Y$?: number) { this.X = X$ ?? 0 this.Y = Y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Celsius { diff --git a/tests/tests/interface_subset_cast/interface_subset_cast.gs.ts b/tests/tests/interface_subset_cast/interface_subset_cast.gs.ts index 5fb370863..a38411809 100644 --- a/tests/tests/interface_subset_cast/interface_subset_cast.gs.ts +++ b/tests/tests/interface_subset_cast/interface_subset_cast.gs.ts @@ -32,7 +32,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, Value1$?: string, Value2$?: string) { this.Value1 = Value1$ ?? "" this.Value2 = Value2$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/interface_subset_type_switch/interface_subset_type_switch.gs.ts b/tests/tests/interface_subset_type_switch/interface_subset_type_switch.gs.ts index 94437fcfa..5915ed5b1 100644 --- a/tests/tests/interface_subset_type_switch/interface_subset_type_switch.gs.ts +++ b/tests/tests/interface_subset_type_switch/interface_subset_type_switch.gs.ts @@ -32,7 +32,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, Value1$?: string, Value2$?: string) { this.Value1 = Value1$ ?? "" this.Value2 = Value2$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.ts b/tests/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.ts index 867bd5bca..bf753e3bf 100644 --- a/tests/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.ts +++ b/tests/tests/interface_to_interface_type_assertion/interface_to_interface_type_assertion.gs.ts @@ -28,7 +28,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, Value$?: number) { this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/interface_type_assertion/interface_type_assertion.gs.ts b/tests/tests/interface_type_assertion/interface_type_assertion.gs.ts index 1f852a1dc..c2297e79e 100644 --- a/tests/tests/interface_type_assertion/interface_type_assertion.gs.ts +++ b/tests/tests/interface_type_assertion/interface_type_assertion.gs.ts @@ -18,7 +18,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, Value$?: number) { this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/interface_whole_program/interface_whole_program.gs.ts b/tests/tests/interface_whole_program/interface_whole_program.gs.ts index 910d1803e..1709eb709 100644 --- a/tests/tests/interface_whole_program/interface_whole_program.gs.ts +++ b/tests/tests/interface_whole_program/interface_whole_program.gs.ts @@ -85,7 +85,7 @@ export class Rect { constructor(__goscriptValue?: boolean, w$?: number, h$?: number) { this.w = w$ ?? 0 this.h = h$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Rect { @@ -117,7 +117,7 @@ export class Square { constructor(__goscriptValue?: boolean, side$?: number) { this.side = side$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Square { @@ -149,7 +149,7 @@ export class Counter { constructor(__goscriptValue?: boolean, n$?: number) { this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Counter { @@ -182,7 +182,7 @@ export class ChanSource { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): ChanSource { @@ -215,7 +215,7 @@ export class chanValuer { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): chanValuer { @@ -247,7 +247,7 @@ export class plusOne { constructor(__goscriptValue?: boolean, _in$?: Valuer | null) { this._in = _in$ ?? (null! as Valuer | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): plusOne { @@ -278,7 +278,7 @@ export class prefixNamer { constructor(__goscriptValue?: boolean, labeler$?: Labeler | null) { this.labeler = labeler$ ?? (null! as Labeler | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): prefixNamer { diff --git a/tests/tests/interface_whole_program_package/main.gs.ts b/tests/tests/interface_whole_program_package/main.gs.ts index 9d30993ff..fb67c52e1 100644 --- a/tests/tests/interface_whole_program_package/main.gs.ts +++ b/tests/tests/interface_whole_program_package/main.gs.ts @@ -6,7 +6,7 @@ import * as visit from "@goscript/github.com/s4wave/goscript/tests/tests/interfa export class doubler { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): doubler { @@ -35,7 +35,7 @@ export class chanFetcher { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): chanFetcher { diff --git a/tests/tests/issue_119_interface_nil_value/issue_119_interface_nil_value.gs.ts b/tests/tests/issue_119_interface_nil_value/issue_119_interface_nil_value.gs.ts index 43602c8d3..11b630a6b 100644 --- a/tests/tests/issue_119_interface_nil_value/issue_119_interface_nil_value.gs.ts +++ b/tests/tests/issue_119_interface_nil_value/issue_119_interface_nil_value.gs.ts @@ -18,7 +18,7 @@ export class Dog { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Dog { @@ -52,7 +52,7 @@ export class Cat { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Cat { diff --git a/tests/tests/js_global_name_shadow/js_global_name_shadow.gs.ts b/tests/tests/js_global_name_shadow/js_global_name_shadow.gs.ts index 40c7375bb..fee0d00fc 100644 --- a/tests/tests/js_global_name_shadow/js_global_name_shadow.gs.ts +++ b/tests/tests/js_global_name_shadow/js_global_name_shadow.gs.ts @@ -12,7 +12,7 @@ export class Promise { constructor(__goscriptValue?: boolean, value$?: string) { this.value = value$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Promise { @@ -41,7 +41,7 @@ export class point { constructor(__goscriptValue?: boolean, x$?: number, y$?: number) { this.x = x$ ?? 0 this.y = y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { diff --git a/tests/tests/json_marshal_basic/json_marshal_basic.gs.ts b/tests/tests/json_marshal_basic/json_marshal_basic.gs.ts index 729508e70..477e2e6da 100644 --- a/tests/tests/json_marshal_basic/json_marshal_basic.gs.ts +++ b/tests/tests/json_marshal_basic/json_marshal_basic.gs.ts @@ -15,7 +15,7 @@ export class Person { this.Name = Name$ ?? "" this.Age = Age$ ?? 0 this.Active = Active$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Person { diff --git a/tests/tests/json_simple/json_simple.gs.ts b/tests/tests/json_simple/json_simple.gs.ts index 10c90a42d..5360c8558 100644 --- a/tests/tests/json_simple/json_simple.gs.ts +++ b/tests/tests/json_simple/json_simple.gs.ts @@ -9,7 +9,7 @@ export class Simple { constructor(__goscriptValue?: boolean, X$?: number) { this.X = X$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Simple { diff --git a/tests/tests/json_stream/json_stream.gs.ts b/tests/tests/json_stream/json_stream.gs.ts index 959931929..a074506a5 100644 --- a/tests/tests/json_stream/json_stream.gs.ts +++ b/tests/tests/json_stream/json_stream.gs.ts @@ -18,7 +18,7 @@ export class chanReader { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null, cur$?: string) { this.ch = ch$ ?? (null! as $.Channel | null) this.cur = cur$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): chanReader { @@ -65,7 +65,7 @@ export class item { constructor(__goscriptValue?: boolean, A$?: string, B$?: number) { this.A = A$ ?? "" this.B = B$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/json_value/json_value.gs.ts b/tests/tests/json_value/json_value.gs.ts index f4a931beb..015f506d0 100644 --- a/tests/tests/json_value/json_value.gs.ts +++ b/tests/tests/json_value/json_value.gs.ts @@ -15,7 +15,7 @@ export class Person { this.Name = Name$ ?? "" this.Age = Age$ ?? 0 this.Active = Active$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Person { diff --git a/tests/tests/line_directive_same_package_alias/generated.gs.ts b/tests/tests/line_directive_same_package_alias/generated.gs.ts index 89a12c0ff..2aea22f92 100644 --- a/tests/tests/line_directive_same_package_alias/generated.gs.ts +++ b/tests/tests/line_directive_same_package_alias/generated.gs.ts @@ -8,7 +8,7 @@ export class yySymType { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): yySymType { @@ -31,7 +31,7 @@ export class yySymType { export class yyParserImpl { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): yyParserImpl { diff --git a/tests/tests/local_struct_type_decl/main.gs.ts b/tests/tests/local_struct_type_decl/main.gs.ts index 5596441bf..725930e58 100644 --- a/tests/tests/local_struct_type_decl/main.gs.ts +++ b/tests/tests/local_struct_type_decl/main.gs.ts @@ -9,7 +9,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{value?: number}>, __goscriptValue?: boolean) { this.value = init?.value ?? (0 as number) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): result { diff --git a/tests/tests/local_struct_type_decl_func_lit/main.gs.ts b/tests/tests/local_struct_type_decl_func_lit/main.gs.ts index 54182bf1e..7a1d96e54 100644 --- a/tests/tests/local_struct_type_decl_func_lit/main.gs.ts +++ b/tests/tests/local_struct_type_decl_func_lit/main.gs.ts @@ -13,7 +13,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{name?: string, count?: number}>, __goscriptValue?: boolean) { this.name = init?.name ?? ("" as string) this.count = init?.count ?? (0 as number) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/local_type_same_name/local_type_same_name.gs.ts b/tests/tests/local_type_same_name/local_type_same_name.gs.ts index 337be519f..ef09111be 100644 --- a/tests/tests/local_type_same_name/local_type_same_name.gs.ts +++ b/tests/tests/local_type_same_name/local_type_same_name.gs.ts @@ -10,7 +10,7 @@ export class person { constructor(__goscriptValue?: boolean, ID$?: number) { this.ID = ID$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): person { @@ -49,7 +49,7 @@ export function a(): any { constructor(init?: Partial<{Name?: string, Age?: number}>, __goscriptValue?: boolean) { this.Name = init?.Name ?? ("" as string) this.Age = init?.Age ?? (0 as number) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): person { @@ -79,7 +79,7 @@ export function b(): any { constructor(init?: Partial<{Title?: string}>, __goscriptValue?: boolean) { this.Title = init?.Title ?? ("" as string) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): person { diff --git a/tests/tests/loop_slice_window/loop_slice_window.gs.ts b/tests/tests/loop_slice_window/loop_slice_window.gs.ts index 40b22693c..0e82405cf 100644 --- a/tests/tests/loop_slice_window/loop_slice_window.gs.ts +++ b/tests/tests/loop_slice_window/loop_slice_window.gs.ts @@ -11,7 +11,7 @@ export class pos { constructor(__goscriptValue?: boolean, Line$?: number, Char$?: number) { this.Line = Line$ ?? 0 this.Char = Char$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pos { diff --git a/tests/tests/make_slice_array_elems/make_slice_array_elems.gs.ts b/tests/tests/make_slice_array_elems/make_slice_array_elems.gs.ts index 0e460fae2..c305498b8 100644 --- a/tests/tests/make_slice_array_elems/make_slice_array_elems.gs.ts +++ b/tests/tests/make_slice_array_elems/make_slice_array_elems.gs.ts @@ -15,7 +15,7 @@ export class point { constructor(__goscriptValue?: boolean, X$?: number, Y$?: number) { this.X = X$ ?? 0 this.Y = Y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { diff --git a/tests/tests/make_slice_struct_zero/make_slice_struct_zero.gs.ts b/tests/tests/make_slice_struct_zero/make_slice_struct_zero.gs.ts index 0b5a81339..851de8c90 100644 --- a/tests/tests/make_slice_struct_zero/make_slice_struct_zero.gs.ts +++ b/tests/tests/make_slice_struct_zero/make_slice_struct_zero.gs.ts @@ -8,7 +8,7 @@ export class code { constructor(__goscriptValue?: boolean, len$?: number) { this.len = len$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): code { diff --git a/tests/tests/map_builtin_name_collision/map_builtin_name_collision.gs.ts b/tests/tests/map_builtin_name_collision/map_builtin_name_collision.gs.ts index 9ab0a6e49..980d1ce31 100644 --- a/tests/tests/map_builtin_name_collision/map_builtin_name_collision.gs.ts +++ b/tests/tests/map_builtin_name_collision/map_builtin_name_collision.gs.ts @@ -8,7 +8,7 @@ export class Map { constructor(__goscriptValue?: boolean, values$?: globalThis.Map | null) { this.values = values$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Map { diff --git a/tests/tests/map_index_type_shadow/map_index_type_shadow.gs.ts b/tests/tests/map_index_type_shadow/map_index_type_shadow.gs.ts index 324f9ac07..a2ec480f2 100644 --- a/tests/tests/map_index_type_shadow/map_index_type_shadow.gs.ts +++ b/tests/tests/map_index_type_shadow/map_index_type_shadow.gs.ts @@ -8,7 +8,7 @@ export class item { constructor(__goscriptValue?: boolean, values$?: $.Slice) { this.values = values$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/map_interface_key_pointer_value/map_interface_key_pointer_value.gs.ts b/tests/tests/map_interface_key_pointer_value/map_interface_key_pointer_value.gs.ts index cef6683e5..a646ba614 100644 --- a/tests/tests/map_interface_key_pointer_value/map_interface_key_pointer_value.gs.ts +++ b/tests/tests/map_interface_key_pointer_value/map_interface_key_pointer_value.gs.ts @@ -18,7 +18,7 @@ export class Table { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Table { diff --git a/tests/tests/map_interface_pointer_keys/map_interface_pointer_keys.gs.ts b/tests/tests/map_interface_pointer_keys/map_interface_pointer_keys.gs.ts index 77e0e9862..2117ab170 100644 --- a/tests/tests/map_interface_pointer_keys/map_interface_pointer_keys.gs.ts +++ b/tests/tests/map_interface_pointer_keys/map_interface_pointer_keys.gs.ts @@ -21,7 +21,7 @@ export class node { constructor(__goscriptValue?: boolean, Name$?: string, N$?: number) { this.Name = Name$ ?? "" this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): node { @@ -59,7 +59,7 @@ export class tree { this.Kids = Kids$ ?? (null! as $.Slice | null>) this.Attrs = Attrs$ ?? (null! as globalThis.Map | null) this.Up = Up$ ?? (null! as tree | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): tree { diff --git a/tests/tests/map_range_struct_key_copy/map_range_struct_key_copy.gs.ts b/tests/tests/map_range_struct_key_copy/map_range_struct_key_copy.gs.ts index 8249dae21..275644e99 100644 --- a/tests/tests/map_range_struct_key_copy/map_range_struct_key_copy.gs.ts +++ b/tests/tests/map_range_struct_key_copy/map_range_struct_key_copy.gs.ts @@ -11,7 +11,7 @@ export class Pos { constructor(__goscriptValue?: boolean, Line$?: number, Char$?: number) { this.Line = Line$ ?? 0 this.Char = Char$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pos { @@ -41,7 +41,7 @@ export class Key { constructor(__goscriptValue?: boolean, P$?: Pos, Name$?: string) { this.P = P$ ?? new Pos(true) this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Key { diff --git a/tests/tests/map_struct_key/map_struct_key.gs.ts b/tests/tests/map_struct_key/map_struct_key.gs.ts index df00c0f04..a412ab327 100644 --- a/tests/tests/map_struct_key/map_struct_key.gs.ts +++ b/tests/tests/map_struct_key/map_struct_key.gs.ts @@ -14,7 +14,7 @@ export class requestKey { this.soID = soID$ ?? "" this.inviteID = inviteID$ ?? "" this.peerID = peerID$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): requestKey { @@ -45,7 +45,7 @@ export class node { constructor(__goscriptValue?: boolean, value$?: string, next$?: node | $.VarRef | null) { this.value = value$ ?? "" this.next = next$ ?? (null! as node | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): node { diff --git a/tests/tests/map_struct_key_numeric_fields/map_struct_key_numeric_fields.gs.ts b/tests/tests/map_struct_key_numeric_fields/map_struct_key_numeric_fields.gs.ts index 520b9c573..54daa1e8d 100644 --- a/tests/tests/map_struct_key_numeric_fields/map_struct_key_numeric_fields.gs.ts +++ b/tests/tests/map_struct_key_numeric_fields/map_struct_key_numeric_fields.gs.ts @@ -11,7 +11,7 @@ export class Pos { constructor(__goscriptValue?: boolean, Ln$?: number, Ch$?: number) { this.Ln = Ln$ ?? 0 this.Ch = Ch$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pos { @@ -47,7 +47,7 @@ export class Key { this.At = At$ ?? new Pos(true) this.On = On$ ?? false this.F = F$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Key { @@ -76,7 +76,7 @@ export class Rule { constructor(__goscriptValue?: boolean, Name$?: string) { this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Rule { @@ -105,7 +105,7 @@ export class ScopeRule { constructor(__goscriptValue?: boolean, Scope$?: Pos, Rule$?: Rule | $.VarRef | null) { this.Scope = Scope$ ?? new Pos(true) this.Rule = Rule$ ?? (null! as Rule | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): ScopeRule { @@ -135,7 +135,7 @@ export class Pair { constructor(__goscriptValue?: boolean, A$?: string, B$?: string) { this.A = A$ ?? "" this.B = B$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pair { @@ -165,7 +165,7 @@ export class Other { constructor(__goscriptValue?: boolean, A$?: string, B$?: string) { this.A = A$ ?? "" this.B = B$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Other { @@ -195,7 +195,7 @@ export class Vec { constructor(__goscriptValue?: boolean, X$?: number, Y$?: number) { this.X = X$ ?? 0 this.Y = Y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Vec { @@ -225,7 +225,7 @@ export class Cplx { constructor(__goscriptValue?: boolean, C$?: $.Complex, N$?: number) { this.C = C$ ?? $.complex(0, 0) this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Cplx { diff --git a/tests/tests/math_rand_sequences/math_rand_sequences.gs.ts b/tests/tests/math_rand_sequences/math_rand_sequences.gs.ts index 7d19cee43..43e982bdc 100644 --- a/tests/tests/math_rand_sequences/math_rand_sequences.gs.ts +++ b/tests/tests/math_rand_sequences/math_rand_sequences.gs.ts @@ -10,7 +10,7 @@ export class lcg { constructor(__goscriptValue?: boolean, x$?: bigint) { this.x = x$ ?? 0n - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): lcg { diff --git a/tests/tests/math_rand_v2_sequences/math_rand_v2_sequences.gs.ts b/tests/tests/math_rand_v2_sequences/math_rand_v2_sequences.gs.ts index 1fe79ff70..411c1b6ef 100644 --- a/tests/tests/math_rand_v2_sequences/math_rand_v2_sequences.gs.ts +++ b/tests/tests/math_rand_v2_sequences/math_rand_v2_sequences.gs.ts @@ -12,7 +12,7 @@ export class splitmix { constructor(__goscriptValue?: boolean, x$?: bigint) { this.x = x$ ?? 0n - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): splitmix { diff --git a/tests/tests/method_async_call/method_async_call.gs.ts b/tests/tests/method_async_call/method_async_call.gs.ts index 64a911139..d144931a2 100644 --- a/tests/tests/method_async_call/method_async_call.gs.ts +++ b/tests/tests/method_async_call/method_async_call.gs.ts @@ -12,7 +12,7 @@ export class FileTracker { constructor(__goscriptValue?: boolean, mutex$?: sync.Mutex, lines$?: $.Slice) { this.mutex = mutex$ ?? $.markAsStructValue(new sync.Mutex()) this.lines = lines$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): FileTracker { @@ -47,7 +47,7 @@ export class Scanner { constructor(__goscriptValue?: boolean, file$?: FileTracker | $.VarRef | null) { this.file = file$ ?? (null! as FileTracker | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Scanner { diff --git a/tests/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.ts b/tests/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.ts index 09b80bbf0..5232f4aa1 100644 --- a/tests/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.ts +++ b/tests/tests/method_call_on_pointer_receiver/method_call_on_pointer_receiver.gs.ts @@ -11,7 +11,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, MyInt$?: number, MyString$?: string) { this.MyInt = MyInt$ ?? 0 this.MyString = MyString$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { @@ -43,7 +43,7 @@ export class setterStruct { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): setterStruct { @@ -79,7 +79,7 @@ export class digest { constructor(__goscriptValue?: boolean, writes$?: number) { this.writes = writes$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): digest { diff --git a/tests/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.ts b/tests/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.ts index d912979f0..8e8902f57 100644 --- a/tests/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.ts +++ b/tests/tests/method_call_on_pointer_via_value/method_call_on_pointer_via_value.gs.ts @@ -8,7 +8,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, MyInt$?: number) { this.MyInt = MyInt$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.ts b/tests/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.ts index ef5f398ed..6d1c5fad5 100644 --- a/tests/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.ts +++ b/tests/tests/method_call_on_value_receiver/method_call_on_value_receiver.gs.ts @@ -11,7 +11,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, MyInt$?: number, MyString$?: string) { this.MyInt = MyInt$ ?? 0 this.MyString = MyString$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.ts b/tests/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.ts index 4d9054c0a..1cc722721 100644 --- a/tests/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.ts +++ b/tests/tests/method_call_on_value_via_pointer/method_call_on_value_via_pointer.gs.ts @@ -8,7 +8,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, MyInt$?: number) { this.MyInt = MyInt$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/method_receiver_reassign/method_receiver_reassign.gs.ts b/tests/tests/method_receiver_reassign/method_receiver_reassign.gs.ts index 60d6a9c36..1e0684624 100644 --- a/tests/tests/method_receiver_reassign/method_receiver_reassign.gs.ts +++ b/tests/tests/method_receiver_reassign/method_receiver_reassign.gs.ts @@ -8,7 +8,7 @@ export class item { constructor(__goscriptValue?: boolean, n$?: number) { this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { @@ -54,7 +54,7 @@ export class list { constructor(__goscriptValue?: boolean, n$?: number, next$?: list | $.VarRef | null) { this.n = n$ ?? 0 this.next = next$ ?? (null! as list | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): list { diff --git a/tests/tests/method_receiver_with_call_expr/method_receiver_with_call_expr.gs.ts b/tests/tests/method_receiver_with_call_expr/method_receiver_with_call_expr.gs.ts index d7881ce41..7868c29e5 100644 --- a/tests/tests/method_receiver_with_call_expr/method_receiver_with_call_expr.gs.ts +++ b/tests/tests/method_receiver_with_call_expr/method_receiver_with_call_expr.gs.ts @@ -11,7 +11,7 @@ export class State { constructor(__goscriptValue?: boolean, value$?: number, index$?: $.VarRef | null) { this.value = value$ ?? 0 this.index = index$ ?? (null! as $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): State { diff --git a/tests/tests/method_result_imports_cross_file/dep1/dep1.gs.ts b/tests/tests/method_result_imports_cross_file/dep1/dep1.gs.ts index a58aaa313..e2269d987 100644 --- a/tests/tests/method_result_imports_cross_file/dep1/dep1.gs.ts +++ b/tests/tests/method_result_imports_cross_file/dep1/dep1.gs.ts @@ -9,7 +9,7 @@ $.registerTypePackagePath("github.com/s4wave/goscript/tests/tests/method_result_ export class maker { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): maker { diff --git a/tests/tests/method_result_imports_cross_file/main.gs.ts b/tests/tests/method_result_imports_cross_file/main.gs.ts index 6821aced3..7165f2823 100644 --- a/tests/tests/method_result_imports_cross_file/main.gs.ts +++ b/tests/tests/method_result_imports_cross_file/main.gs.ts @@ -10,7 +10,7 @@ import "./method.gs.ts" export class Holder { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Holder { diff --git a/tests/tests/mutex_critical_sections/mutex_critical_sections.gs.ts b/tests/tests/mutex_critical_sections/mutex_critical_sections.gs.ts index c0b58253e..f22092dc6 100644 --- a/tests/tests/mutex_critical_sections/mutex_critical_sections.gs.ts +++ b/tests/tests/mutex_critical_sections/mutex_critical_sections.gs.ts @@ -12,7 +12,7 @@ export class counter { constructor(__goscriptValue?: boolean, mu$?: sync.Mutex, n$?: number) { this.mu = mu$ ?? $.markAsStructValue(new sync.Mutex()) this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): counter { @@ -63,7 +63,7 @@ export class queue { this.mu = mu$ ?? $.markAsStructValue(new sync.Mutex()) this.items = items$ ?? (null! as $.Slice) this.ready = ready$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): queue { @@ -113,7 +113,7 @@ export class shared { constructor(__goscriptValue?: boolean, mu$?: sync.Mutex, n$?: number) { this.mu = mu$ ?? $.markAsStructValue(new sync.Mutex()) this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): shared { @@ -157,7 +157,7 @@ export class gate { this.started = started$ ?? (null! as $.Channel | null) this.wake = wake$ ?? (null! as $.Channel | null) this.log = log$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): gate { @@ -215,7 +215,7 @@ export class relay { this.started = started$ ?? (null! as $.Channel | null) this.wake = wake$ ?? (null! as $.Channel | null) this.log = log$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): relay { diff --git a/tests/tests/named_basic_interface_assert/named_basic_interface_assert.gs.ts b/tests/tests/named_basic_interface_assert/named_basic_interface_assert.gs.ts index 094b5fafa..e70b4c34f 100644 --- a/tests/tests/named_basic_interface_assert/named_basic_interface_assert.gs.ts +++ b/tests/tests/named_basic_interface_assert/named_basic_interface_assert.gs.ts @@ -184,7 +184,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{N?: Name, Is?: $.Slice}>, __goscriptValue?: boolean) { this.N = init?.N ?? ("" as Name) this.Is = init?.Is ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { diff --git a/tests/tests/named_channel_zero_value_cross_file/types.gs.ts b/tests/tests/named_channel_zero_value_cross_file/types.gs.ts index 1c5743f5d..93e2dd27d 100644 --- a/tests/tests/named_channel_zero_value_cross_file/types.gs.ts +++ b/tests/tests/named_channel_zero_value_cross_file/types.gs.ts @@ -10,7 +10,7 @@ export class Job { constructor(__goscriptValue?: boolean, Value$?: string) { this.Value = Value$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Job { diff --git a/tests/tests/named_function_type_call/named_function_type_call.gs.ts b/tests/tests/named_function_type_call/named_function_type_call.gs.ts index d9bde480f..12df65e03 100644 --- a/tests/tests/named_function_type_call/named_function_type_call.gs.ts +++ b/tests/tests/named_function_type_call/named_function_type_call.gs.ts @@ -52,7 +52,7 @@ export class MockFileInfo { this.name = name$ ?? "" this.size = size$ ?? 0n this.isDir = isDir$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MockFileInfo { @@ -92,7 +92,7 @@ export class MockFileInfo { export class MockFilesystem { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MockFilesystem { @@ -122,7 +122,7 @@ export class shapeNode { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): shapeNode { @@ -153,7 +153,7 @@ export class MorphismHolder { constructor(__goscriptValue?: boolean, morphism$?: ((_p0: Shape | null) => Shape | null | globalThis.Promise) | null) { this.morphism = morphism$ ?? (null! as ((_p0: Shape | null) => Shape | null | globalThis.Promise) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MorphismHolder { @@ -189,7 +189,7 @@ export class morphismWorker { constructor(__goscriptValue?: boolean, ready$?: $.Channel | null) { this.ready = ready$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): morphismWorker { diff --git a/tests/tests/named_return_method/named_return_method.gs.ts b/tests/tests/named_return_method/named_return_method.gs.ts index 14cbd8cd3..0a97df83b 100644 --- a/tests/tests/named_return_method/named_return_method.gs.ts +++ b/tests/tests/named_return_method/named_return_method.gs.ts @@ -8,7 +8,7 @@ export class content { constructor(__goscriptValue?: boolean, bytes$?: $.Slice) { this.bytes = bytes$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): content { diff --git a/tests/tests/named_struct_underlying_methodset/named_struct_underlying_methodset.gs.ts b/tests/tests/named_struct_underlying_methodset/named_struct_underlying_methodset.gs.ts index c0016b569..9ed2cbd42 100644 --- a/tests/tests/named_struct_underlying_methodset/named_struct_underlying_methodset.gs.ts +++ b/tests/tests/named_struct_underlying_methodset/named_struct_underlying_methodset.gs.ts @@ -15,7 +15,7 @@ $.registerInterfaceType( export class Base { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Base { @@ -41,7 +41,7 @@ export class Base { export class Derived { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Derived { diff --git a/tests/tests/named_type_wrapper/named_type_wrapper.gs.ts b/tests/tests/named_type_wrapper/named_type_wrapper.gs.ts index f3dfd0707..c004e4695 100644 --- a/tests/tests/named_type_wrapper/named_type_wrapper.gs.ts +++ b/tests/tests/named_type_wrapper/named_type_wrapper.gs.ts @@ -25,7 +25,7 @@ export class FileStatus { constructor(__goscriptValue?: boolean, mode$?: MyFileMode, size$?: bigint) { this.mode = mode$ ?? 0 this.size = size$ ?? 0n - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): FileStatus { diff --git a/tests/tests/nested_async_method_value/nested_async_method_value.gs.ts b/tests/tests/nested_async_method_value/nested_async_method_value.gs.ts index 626a52e2e..854b844c7 100644 --- a/tests/tests/nested_async_method_value/nested_async_method_value.gs.ts +++ b/tests/tests/nested_async_method_value/nested_async_method_value.gs.ts @@ -18,7 +18,7 @@ export class Worker { constructor(__goscriptValue?: boolean, ch$?: $.Channel | null) { this.ch = ch$ ?? (null! as $.Channel | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Worker { diff --git a/tests/tests/net_http_header_struct_zero/net_http_header_struct_zero.gs.ts b/tests/tests/net_http_header_struct_zero/net_http_header_struct_zero.gs.ts index b7df3779c..ec46edf95 100644 --- a/tests/tests/net_http_header_struct_zero/net_http_header_struct_zero.gs.ts +++ b/tests/tests/net_http_header_struct_zero/net_http_header_struct_zero.gs.ts @@ -9,7 +9,7 @@ export class responseWriter { constructor(__goscriptValue?: boolean, header$?: http.Header) { this.header = header$ ?? (null! as http.Header) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): responseWriter { diff --git a/tests/tests/new_expression/new_expression.gs.ts b/tests/tests/new_expression/new_expression.gs.ts index 6c65f92cf..d62b93c8c 100644 --- a/tests/tests/new_expression/new_expression.gs.ts +++ b/tests/tests/new_expression/new_expression.gs.ts @@ -10,7 +10,7 @@ export class Pair { constructor(__goscriptValue?: boolean, Value$?: number) { this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pair { diff --git a/tests/tests/nil_pointer_receiver_field_method/nil_pointer_receiver_field_method.gs.ts b/tests/tests/nil_pointer_receiver_field_method/nil_pointer_receiver_field_method.gs.ts index 4e7c4c647..ca634410a 100644 --- a/tests/tests/nil_pointer_receiver_field_method/nil_pointer_receiver_field_method.gs.ts +++ b/tests/tests/nil_pointer_receiver_field_method/nil_pointer_receiver_field_method.gs.ts @@ -8,7 +8,7 @@ export class child { constructor(__goscriptValue?: boolean, value$?: string) { this.value = value$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): child { @@ -42,7 +42,7 @@ export class parent { constructor(__goscriptValue?: boolean, child$?: child | $.VarRef | null) { this.child = child$ ?? (null! as child | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): parent { diff --git a/tests/tests/nil_slice_append_spread/nil_slice_append_spread.gs.ts b/tests/tests/nil_slice_append_spread/nil_slice_append_spread.gs.ts index 86663a918..51e338677 100644 --- a/tests/tests/nil_slice_append_spread/nil_slice_append_spread.gs.ts +++ b/tests/tests/nil_slice_append_spread/nil_slice_append_spread.gs.ts @@ -8,7 +8,7 @@ export class item { constructor(__goscriptValue?: boolean, value$?: string) { this.value = value$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/nil_slice_closure_append/nil_slice_closure_append.gs.ts b/tests/tests/nil_slice_closure_append/nil_slice_closure_append.gs.ts index 751332338..0d760b775 100644 --- a/tests/tests/nil_slice_closure_append/nil_slice_closure_append.gs.ts +++ b/tests/tests/nil_slice_closure_append/nil_slice_closure_append.gs.ts @@ -8,7 +8,7 @@ export class item { constructor(__goscriptValue?: boolean, Value$?: number) { this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/nullable_function_param_call/nullable_function_param_call.gs.ts b/tests/tests/nullable_function_param_call/nullable_function_param_call.gs.ts index 1f07bccc0..287984214 100644 --- a/tests/tests/nullable_function_param_call/nullable_function_param_call.gs.ts +++ b/tests/tests/nullable_function_param_call/nullable_function_param_call.gs.ts @@ -44,7 +44,7 @@ export class MockFileInfo { this.name = name$ ?? "" this.size = size$ ?? 0n this.isDir = isDir$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MockFileInfo { @@ -84,7 +84,7 @@ export class MockFileInfo { export class MockFilesystem { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MockFilesystem { diff --git a/tests/tests/override_variadic_func_values/override_variadic_func_values.gs.ts b/tests/tests/override_variadic_func_values/override_variadic_func_values.gs.ts index 6cb44b605..6caaa1fa0 100644 --- a/tests/tests/override_variadic_func_values/override_variadic_func_values.gs.ts +++ b/tests/tests/override_variadic_func_values/override_variadic_func_values.gs.ts @@ -12,7 +12,7 @@ export class printer { constructor(__goscriptValue?: boolean, print$?: ((a: $.Slice) => string | globalThis.Promise) | null) { this.print = print$ ?? (null! as ((a: $.Slice) => string | globalThis.Promise) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): printer { diff --git a/tests/tests/override_variadic_method_value/override_variadic_method_value.gs.ts b/tests/tests/override_variadic_method_value/override_variadic_method_value.gs.ts index f997569f7..8eb4ce1dd 100644 --- a/tests/tests/override_variadic_method_value/override_variadic_method_value.gs.ts +++ b/tests/tests/override_variadic_method_value/override_variadic_method_value.gs.ts @@ -9,7 +9,7 @@ export class recorder { constructor(__goscriptValue?: boolean, obj$?: js.Value) { this.obj = obj$ ?? $.markAsStructValue(new js.Value()) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): recorder { diff --git a/tests/tests/package_import_container_list/package_import_container_list.gs.ts b/tests/tests/package_import_container_list/package_import_container_list.gs.ts index 1be747c2c..e7b601efc 100644 --- a/tests/tests/package_import_container_list/package_import_container_list.gs.ts +++ b/tests/tests/package_import_container_list/package_import_container_list.gs.ts @@ -11,7 +11,7 @@ export class pooledElement { constructor(__goscriptValue?: boolean, Value$?: any) { this.Value = Value$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pooledElement { diff --git a/tests/tests/package_import_crypto_aes_gcm_roundtrip/main.gs.ts b/tests/tests/package_import_crypto_aes_gcm_roundtrip/main.gs.ts index 9eed3c72c..576edbf7a 100644 --- a/tests/tests/package_import_crypto_aes_gcm_roundtrip/main.gs.ts +++ b/tests/tests/package_import_crypto_aes_gcm_roundtrip/main.gs.ts @@ -21,7 +21,7 @@ export class wrappedAEAD { constructor(__goscriptValue?: boolean, inner$?: cipher.AEAD | null) { this.inner = inner$ ?? (null! as cipher.AEAD | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): wrappedAEAD { @@ -73,7 +73,7 @@ export class nestedSealer { this.aead = aead$ ?? (null! as cipher.AEAD | null) this.nonce = nonce$ ?? (null! as $.Slice) this.aad = aad$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): nestedSealer { diff --git a/tests/tests/package_import_crypto_ecdh_custom_reader/package_import_crypto_ecdh_custom_reader.gs.ts b/tests/tests/package_import_crypto_ecdh_custom_reader/package_import_crypto_ecdh_custom_reader.gs.ts index 0a0c9e637..b5abc7fdf 100644 --- a/tests/tests/package_import_crypto_ecdh_custom_reader/package_import_crypto_ecdh_custom_reader.gs.ts +++ b/tests/tests/package_import_crypto_ecdh_custom_reader/package_import_crypto_ecdh_custom_reader.gs.ts @@ -19,7 +19,7 @@ export class segmentedReader { this.data = data$ ?? (null! as $.Slice) this.offset = offset$ ?? 0 this.step = step$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): segmentedReader { @@ -56,7 +56,7 @@ export class segmentedReader { export class failingReader { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): failingReader { diff --git a/tests/tests/package_import_dot_qualified/dep/dep.gs.ts b/tests/tests/package_import_dot_qualified/dep/dep.gs.ts index 21b582fb6..a28974f8f 100644 --- a/tests/tests/package_import_dot_qualified/dep/dep.gs.ts +++ b/tests/tests/package_import_dot_qualified/dep/dep.gs.ts @@ -10,7 +10,7 @@ export class Box { constructor(__goscriptValue?: boolean, N$?: number) { this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Box { diff --git a/tests/tests/package_import_embedded_forwarder/dep/dep.gs.ts b/tests/tests/package_import_embedded_forwarder/dep/dep.gs.ts index 960326eb8..42bb82a1f 100644 --- a/tests/tests/package_import_embedded_forwarder/dep/dep.gs.ts +++ b/tests/tests/package_import_embedded_forwarder/dep/dep.gs.ts @@ -25,7 +25,7 @@ export class BaseStore { constructor(__goscriptValue?: boolean, CoreStore$?: inner.CoreStore | $.VarRef | null) { this.CoreStore = CoreStore$ ?? (null! as inner.CoreStore | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): BaseStore { diff --git a/tests/tests/package_import_embedded_forwarder/dep/inner/inner.gs.ts b/tests/tests/package_import_embedded_forwarder/dep/inner/inner.gs.ts index e7cc128b1..2acf003c2 100644 --- a/tests/tests/package_import_embedded_forwarder/dep/inner/inner.gs.ts +++ b/tests/tests/package_import_embedded_forwarder/dep/inner/inner.gs.ts @@ -11,7 +11,7 @@ export class CoreStore { constructor(__goscriptValue?: boolean, Prefix$?: string) { this.Prefix = Prefix$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): CoreStore { diff --git a/tests/tests/package_import_embedded_forwarder/dep/tx/tx.gs.ts b/tests/tests/package_import_embedded_forwarder/dep/tx/tx.gs.ts index acd5f65cb..ad5856742 100644 --- a/tests/tests/package_import_embedded_forwarder/dep/tx/tx.gs.ts +++ b/tests/tests/package_import_embedded_forwarder/dep/tx/tx.gs.ts @@ -10,7 +10,7 @@ export class Tx { constructor(__goscriptValue?: boolean, Name$?: string) { this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Tx { diff --git a/tests/tests/package_import_embedded_forwarder/package_import_embedded_forwarder.gs.ts b/tests/tests/package_import_embedded_forwarder/package_import_embedded_forwarder.gs.ts index 71ce523d4..46270dfc5 100644 --- a/tests/tests/package_import_embedded_forwarder/package_import_embedded_forwarder.gs.ts +++ b/tests/tests/package_import_embedded_forwarder/package_import_embedded_forwarder.gs.ts @@ -27,7 +27,7 @@ export class VerboseStore { constructor(__goscriptValue?: boolean, BaseStore$?: dep.BaseStore | $.VarRef | null, name$?: string) { this.BaseStore = BaseStore$ ?? (null! as dep.BaseStore | $.VarRef | null) this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): VerboseStore { diff --git a/tests/tests/package_import_encoding_json/package_import_encoding_json.gs.ts b/tests/tests/package_import_encoding_json/package_import_encoding_json.gs.ts index f1e54f452..2d8d3d4cc 100644 --- a/tests/tests/package_import_encoding_json/package_import_encoding_json.gs.ts +++ b/tests/tests/package_import_encoding_json/package_import_encoding_json.gs.ts @@ -15,7 +15,7 @@ export class Holder { constructor(__goscriptValue?: boolean, Tags$?: globalThis.Map | null) { this.Tags = Tags$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Holder { @@ -53,7 +53,7 @@ export class Enc { this.Frames = Frames$ ?? (null! as $.Slice<$.Slice>) this.Named = Named$ ?? (null! as globalThis.Map> | null) this.Nested = Nested$ ?? (null! as Enc | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Enc { @@ -86,7 +86,7 @@ export class Event { constructor(__goscriptValue?: boolean, Name$?: string, At$?: time.Time) { this.Name = Name$ ?? "" this.At = At$ ?? $.markAsStructValue(new time.Time()) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Event { @@ -119,7 +119,7 @@ export class Person { this.Name = Name$ ?? "" this.Age = Age$ ?? 0 this.Active = Active$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Person { diff --git a/tests/tests/package_import_encoding_json_async_marshaler/package_import_encoding_json_async_marshaler.gs.ts b/tests/tests/package_import_encoding_json_async_marshaler/package_import_encoding_json_async_marshaler.gs.ts index bd7917b68..b523ef40e 100644 --- a/tests/tests/package_import_encoding_json_async_marshaler/package_import_encoding_json_async_marshaler.gs.ts +++ b/tests/tests/package_import_encoding_json_async_marshaler/package_import_encoding_json_async_marshaler.gs.ts @@ -12,7 +12,7 @@ export class Image { constructor(__goscriptValue?: boolean, Name$?: string) { this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Image { @@ -77,7 +77,7 @@ export class Doc { this.Title = Title$ ?? "" this.Image = Image$ ?? (null! as Image | $.VarRef | null) this.Note = Note$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Doc { diff --git a/tests/tests/package_import_encoding_json_embedded_fields/package_import_encoding_json_embedded_fields.gs.ts b/tests/tests/package_import_encoding_json_embedded_fields/package_import_encoding_json_embedded_fields.gs.ts index 37108d36a..d850cbf17 100644 --- a/tests/tests/package_import_encoding_json_embedded_fields/package_import_encoding_json_embedded_fields.gs.ts +++ b/tests/tests/package_import_encoding_json_embedded_fields/package_import_encoding_json_embedded_fields.gs.ts @@ -19,7 +19,7 @@ export class Base { this.Kids = Kids$ ?? (null! as $.Slice) this.hidden = hidden$ ?? 0 this.Shadowed = Shadowed$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Base { @@ -48,7 +48,7 @@ export class inner { constructor(__goscriptValue?: boolean, Deep$?: number) { this.Deep = Deep$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): inner { @@ -74,7 +74,7 @@ export class Extra { constructor(__goscriptValue?: boolean, Note$?: string) { this.Note = Note$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Extra { @@ -118,7 +118,7 @@ export class Node { this.Shadowed = Shadowed$ ?? "" this.Size = Size$ ?? 0 this._private = _private$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Node { diff --git a/tests/tests/package_import_encoding_json_omitempty_pointer_interface/package_import_encoding_json_omitempty_pointer_interface.gs.ts b/tests/tests/package_import_encoding_json_omitempty_pointer_interface/package_import_encoding_json_omitempty_pointer_interface.gs.ts index 43e05ed76..b2b5ac264 100644 --- a/tests/tests/package_import_encoding_json_omitempty_pointer_interface/package_import_encoding_json_omitempty_pointer_interface.gs.ts +++ b/tests/tests/package_import_encoding_json_omitempty_pointer_interface/package_import_encoding_json_omitempty_pointer_interface.gs.ts @@ -32,7 +32,7 @@ export class Payload { this.IfaceEmptyMap = IfaceEmptyMap$ ?? (null! as any) this.PtrNilIface = PtrNilIface$ ?? (null! as $.VarRef | null) this.PtrBool = PtrBool$ ?? (null! as $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Payload { diff --git a/tests/tests/package_import_encoding_json_reuse_interface_elements/package_import_encoding_json_reuse_interface_elements.gs.ts b/tests/tests/package_import_encoding_json_reuse_interface_elements/package_import_encoding_json_reuse_interface_elements.gs.ts index 00a4ab29c..a5e26710b 100644 --- a/tests/tests/package_import_encoding_json_reuse_interface_elements/package_import_encoding_json_reuse_interface_elements.gs.ts +++ b/tests/tests/package_import_encoding_json_reuse_interface_elements/package_import_encoding_json_reuse_interface_elements.gs.ts @@ -20,7 +20,7 @@ export class Node { constructor(__goscriptValue?: boolean, Name$?: string) { this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Node { @@ -51,7 +51,7 @@ export class Custom { constructor(__goscriptValue?: boolean, Text$?: string) { this.Text = Text$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Custom { @@ -88,7 +88,7 @@ export class Holder { constructor(__goscriptValue?: boolean, Items$?: $.Slice) { this.Items = Items$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Holder { diff --git a/tests/tests/package_import_encoding_json_tag_not_first/package_import_encoding_json_tag_not_first.gs.ts b/tests/tests/package_import_encoding_json_tag_not_first/package_import_encoding_json_tag_not_first.gs.ts index 750deee29..d17d9665c 100644 --- a/tests/tests/package_import_encoding_json_tag_not_first/package_import_encoding_json_tag_not_first.gs.ts +++ b/tests/tests/package_import_encoding_json_tag_not_first/package_import_encoding_json_tag_not_first.gs.ts @@ -21,7 +21,7 @@ export class Node { this.Label = Label$ ?? "" this.Empty = Empty$ ?? "" this.Kept = Kept$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Node { diff --git a/tests/tests/package_import_encoding_json_text_map_keys/package_import_encoding_json_text_map_keys.gs.ts b/tests/tests/package_import_encoding_json_text_map_keys/package_import_encoding_json_text_map_keys.gs.ts index 09efa72b1..90d988fd4 100644 --- a/tests/tests/package_import_encoding_json_text_map_keys/package_import_encoding_json_text_map_keys.gs.ts +++ b/tests/tests/package_import_encoding_json_text_map_keys/package_import_encoding_json_text_map_keys.gs.ts @@ -41,7 +41,7 @@ export class Doc { this.Styles = Styles$ ?? (null! as globalThis.Map | null) this.Counts = Counts$ ?? (null! as globalThis.Map | null) this.Big = Big$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Doc { diff --git a/tests/tests/package_import_encoding_json_unmarshal_pointer_hook/package_import_encoding_json_unmarshal_pointer_hook.gs.ts b/tests/tests/package_import_encoding_json_unmarshal_pointer_hook/package_import_encoding_json_unmarshal_pointer_hook.gs.ts index d0fc921dd..def7d38e7 100644 --- a/tests/tests/package_import_encoding_json_unmarshal_pointer_hook/package_import_encoding_json_unmarshal_pointer_hook.gs.ts +++ b/tests/tests/package_import_encoding_json_unmarshal_pointer_hook/package_import_encoding_json_unmarshal_pointer_hook.gs.ts @@ -34,7 +34,7 @@ export class Hooked { constructor(__goscriptValue?: boolean, Calls$?: number, Seen$?: string) { this.Calls = Calls$ ?? 0 this.Seen = Seen$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Hooked { @@ -69,7 +69,7 @@ export class Box { constructor(__goscriptValue?: boolean, Value$?: Hooked | $.VarRef | null) { this.Value = Value$ ?? (null! as Hooked | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Box { @@ -98,7 +98,7 @@ export class MapItem { constructor(__goscriptValue?: boolean, Name$?: string, Map$?: globalThis.Map | null) { this.Name = Name$ ?? "" this.Map = Map$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MapItem { diff --git a/tests/tests/package_import_encoding_json_value_method_set/package_import_encoding_json_value_method_set.gs.ts b/tests/tests/package_import_encoding_json_value_method_set/package_import_encoding_json_value_method_set.gs.ts index b43090fd8..194788b82 100644 --- a/tests/tests/package_import_encoding_json_value_method_set/package_import_encoding_json_value_method_set.gs.ts +++ b/tests/tests/package_import_encoding_json_value_method_set/package_import_encoding_json_value_method_set.gs.ts @@ -13,7 +13,7 @@ export class Node { constructor(__goscriptValue?: boolean, A$?: number, B$?: string) { this.A = A$ ?? 0 this.B = B$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Node { diff --git a/tests/tests/package_import_errors/package_import_errors.gs.ts b/tests/tests/package_import_errors/package_import_errors.gs.ts index a4640bb4f..aa0f59fca 100644 --- a/tests/tests/package_import_errors/package_import_errors.gs.ts +++ b/tests/tests/package_import_errors/package_import_errors.gs.ts @@ -23,7 +23,7 @@ export class customErr { constructor(__goscriptValue?: boolean, msg$?: string) { this.msg = msg$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): customErr { @@ -54,7 +54,7 @@ export class wrappedErr { constructor(__goscriptValue?: boolean, err$?: $.GoError) { this.err = err$ ?? (null! as $.GoError) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): wrappedErr { diff --git a/tests/tests/package_import_errors_as_interface/package_import_errors_as_interface.gs.ts b/tests/tests/package_import_errors_as_interface/package_import_errors_as_interface.gs.ts index f447ed030..845f8f034 100644 --- a/tests/tests/package_import_errors_as_interface/package_import_errors_as_interface.gs.ts +++ b/tests/tests/package_import_errors_as_interface/package_import_errors_as_interface.gs.ts @@ -20,7 +20,7 @@ export class wrappedHealthError { constructor(__goscriptValue?: boolean, err$?: $.GoError) { this.err = err$ ?? (null! as $.GoError) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): wrappedHealthError { diff --git a/tests/tests/package_import_fmt/package_import_fmt.gs.ts b/tests/tests/package_import_fmt/package_import_fmt.gs.ts index e0f0fca56..5d278cd02 100644 --- a/tests/tests/package_import_fmt/package_import_fmt.gs.ts +++ b/tests/tests/package_import_fmt/package_import_fmt.gs.ts @@ -26,7 +26,7 @@ export class byteFormatter { constructor(__goscriptValue?: boolean, prefix$?: $.Slice) { this.prefix = prefix$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): byteFormatter { @@ -62,7 +62,7 @@ export class pos { constructor(__goscriptValue?: boolean, Line$?: number, Char$?: number) { this.Line = Line$ ?? 0 this.Char = Char$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pos { diff --git a/tests/tests/package_import_fmt_pointer_receiver_stringer/package_import_fmt_pointer_receiver_stringer.gs.ts b/tests/tests/package_import_fmt_pointer_receiver_stringer/package_import_fmt_pointer_receiver_stringer.gs.ts index 1cba8804d..b8682e714 100644 --- a/tests/tests/package_import_fmt_pointer_receiver_stringer/package_import_fmt_pointer_receiver_stringer.gs.ts +++ b/tests/tests/package_import_fmt_pointer_receiver_stringer/package_import_fmt_pointer_receiver_stringer.gs.ts @@ -22,7 +22,7 @@ export class Lex { constructor(__goscriptValue?: boolean, Name$?: string, Start$?: number) { this.Name = Name$ ?? "" this.Start = Start$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Lex { @@ -55,7 +55,7 @@ export class Val { constructor(__goscriptValue?: boolean, N$?: number) { this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Val { diff --git a/tests/tests/package_import_io/package_import_io.gs.ts b/tests/tests/package_import_io/package_import_io.gs.ts index 0c48ce7e9..164fa502e 100644 --- a/tests/tests/package_import_io/package_import_io.gs.ts +++ b/tests/tests/package_import_io/package_import_io.gs.ts @@ -11,7 +11,7 @@ export class writerHolder { constructor(__goscriptValue?: boolean, w$?: io.Writer | null) { this.w = w$ ?? (null! as io.Writer | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): writerHolder { @@ -34,7 +34,7 @@ export class writerHolder { export class asyncBuffer { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): asyncBuffer { @@ -74,7 +74,7 @@ export class staticReader { constructor(__goscriptValue?: boolean, done$?: boolean) { this.done = done$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): staticReader { @@ -111,7 +111,7 @@ export class asyncReader { constructor(__goscriptValue?: boolean, done$?: boolean) { this.done = done$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): asyncReader { @@ -149,7 +149,7 @@ export class asyncReaderAt { constructor(__goscriptValue?: boolean, data$?: $.Slice) { this.data = data$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): asyncReaderAt { @@ -198,7 +198,7 @@ export class pipeReadResult { this.data = data$ ?? "" this.errNil = errNil$ ?? false this.errEOF = errEOF$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pipeReadResult { diff --git a/tests/tests/package_import_io_fs_readdir_varref/package_import_io_fs_readdir_varref.gs.ts b/tests/tests/package_import_io_fs_readdir_varref/package_import_io_fs_readdir_varref.gs.ts index 636857b91..e3834f95a 100644 --- a/tests/tests/package_import_io_fs_readdir_varref/package_import_io_fs_readdir_varref.gs.ts +++ b/tests/tests/package_import_io_fs_readdir_varref/package_import_io_fs_readdir_varref.gs.ts @@ -10,7 +10,7 @@ export class openOnlyFS { constructor(__goscriptValue?: boolean, fsys$?: fstest.MapFS) { this.fsys = fsys$ ?? (null! as fstest.MapFS) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): openOnlyFS { diff --git a/tests/tests/package_import_io_fs_readlink/package_import_io_fs_readlink.gs.ts b/tests/tests/package_import_io_fs_readlink/package_import_io_fs_readlink.gs.ts index 37a79a5a9..35c04c8eb 100644 --- a/tests/tests/package_import_io_fs_readlink/package_import_io_fs_readlink.gs.ts +++ b/tests/tests/package_import_io_fs_readlink/package_import_io_fs_readlink.gs.ts @@ -6,7 +6,7 @@ import * as fs from "@goscript/io/fs/index.js" export class emptyFS { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): emptyFS { @@ -32,7 +32,7 @@ export class emptyFS { export class linkFS { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): linkFS { diff --git a/tests/tests/package_import_io_readfull/package_import_io_readfull.gs.ts b/tests/tests/package_import_io_readfull/package_import_io_readfull.gs.ts index ce0c9aff4..202e04fcd 100644 --- a/tests/tests/package_import_io_readfull/package_import_io_readfull.gs.ts +++ b/tests/tests/package_import_io_readfull/package_import_io_readfull.gs.ts @@ -13,7 +13,7 @@ export class fixedReader { constructor(__goscriptValue?: boolean, data$?: $.Slice, size$?: number) { this.data = data$ ?? (null! as $.Slice) this.size = size$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): fixedReader { diff --git a/tests/tests/package_import_io_value_reader/package_import_io_value_reader.gs.ts b/tests/tests/package_import_io_value_reader/package_import_io_value_reader.gs.ts index 989e1b9d7..3d31d6a7e 100644 --- a/tests/tests/package_import_io_value_reader/package_import_io_value_reader.gs.ts +++ b/tests/tests/package_import_io_value_reader/package_import_io_value_reader.gs.ts @@ -7,7 +7,7 @@ import * as strings from "@goscript/strings/index.js" export class zeroReader { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): zeroReader { diff --git a/tests/tests/package_import_iter_pull/package_import_iter_pull.gs.ts b/tests/tests/package_import_iter_pull/package_import_iter_pull.gs.ts index 9c43bd901..b5d15e5cd 100644 --- a/tests/tests/package_import_iter_pull/package_import_iter_pull.gs.ts +++ b/tests/tests/package_import_iter_pull/package_import_iter_pull.gs.ts @@ -12,7 +12,7 @@ export class pullIterator { constructor(__goscriptValue?: boolean, next$?: (() => [number, boolean] | globalThis.Promise<[number, boolean]>) | null, stop$?: (() => void) | null) { this.next = next$ ?? (null! as (() => [number, boolean] | globalThis.Promise<[number, boolean]>) | null) this.stop = stop$ ?? (null! as (() => void) | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pullIterator { @@ -39,7 +39,7 @@ export class lexer { constructor(__goscriptValue?: boolean, stack$?: $.Slice) { this.stack = stack$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): lexer { diff --git a/tests/tests/package_import_iter_pull_sync_seq/package_import_iter_pull_sync_seq.gs.ts b/tests/tests/package_import_iter_pull_sync_seq/package_import_iter_pull_sync_seq.gs.ts index 430b8ca20..d29bc8328 100644 --- a/tests/tests/package_import_iter_pull_sync_seq/package_import_iter_pull_sync_seq.gs.ts +++ b/tests/tests/package_import_iter_pull_sync_seq/package_import_iter_pull_sync_seq.gs.ts @@ -14,7 +14,7 @@ export class point { constructor(__goscriptValue?: boolean, x$?: number, y$?: number) { this.x = x$ ?? 0 this.y = y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { diff --git a/tests/tests/package_import_named_struct_conversion/package_import_named_struct_conversion.gs.ts b/tests/tests/package_import_named_struct_conversion/package_import_named_struct_conversion.gs.ts index 0c01d607b..146396a87 100644 --- a/tests/tests/package_import_named_struct_conversion/package_import_named_struct_conversion.gs.ts +++ b/tests/tests/package_import_named_struct_conversion/package_import_named_struct_conversion.gs.ts @@ -15,7 +15,7 @@ export class LocalTime { this.wall = wall$ ?? 0n this.ext = ext$ ?? 0n this.loc = loc$ ?? (null! as time.Location | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): LocalTime { diff --git a/tests/tests/package_import_pairing_dial_conversions/package_import_pairing_dial_conversions.gs.ts b/tests/tests/package_import_pairing_dial_conversions/package_import_pairing_dial_conversions.gs.ts index 9115e7f87..e6e050192 100644 --- a/tests/tests/package_import_pairing_dial_conversions/package_import_pairing_dial_conversions.gs.ts +++ b/tests/tests/package_import_pairing_dial_conversions/package_import_pairing_dial_conversions.gs.ts @@ -16,7 +16,7 @@ export class recreateError { constructor(__goscriptValue?: boolean, next$?: bigint) { this.next = next$ ?? 0n - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): recreateError { @@ -44,7 +44,7 @@ export class recreateError { export class readWriteCloser { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): readWriteCloser { diff --git a/tests/tests/package_import_protobuf_equalvt/package_import_protobuf_equalvt.gs.ts b/tests/tests/package_import_protobuf_equalvt/package_import_protobuf_equalvt.gs.ts index 78e962e7a..8f468cebd 100644 --- a/tests/tests/package_import_protobuf_equalvt/package_import_protobuf_equalvt.gs.ts +++ b/tests/tests/package_import_protobuf_equalvt/package_import_protobuf_equalvt.gs.ts @@ -24,7 +24,7 @@ export class msg { constructor(__goscriptValue?: boolean, v$?: number) { this.v = v$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): msg { diff --git a/tests/tests/package_import_reflect/package_import_reflect.gs.ts b/tests/tests/package_import_reflect/package_import_reflect.gs.ts index ea19ecdd7..b806b9caa 100644 --- a/tests/tests/package_import_reflect/package_import_reflect.gs.ts +++ b/tests/tests/package_import_reflect/package_import_reflect.gs.ts @@ -22,7 +22,7 @@ export class Person { constructor(__goscriptValue?: boolean, Name$?: string, Age$?: number) { this.Name = Name$ ?? "" this.Age = Age$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Person { diff --git a/tests/tests/package_import_reserved_alias/package_import_reserved_alias.gs.ts b/tests/tests/package_import_reserved_alias/package_import_reserved_alias.gs.ts index 70f5a3e03..95995bcda 100644 --- a/tests/tests/package_import_reserved_alias/package_import_reserved_alias.gs.ts +++ b/tests/tests/package_import_reserved_alias/package_import_reserved_alias.gs.ts @@ -9,7 +9,7 @@ export class Holder { constructor(__goscriptValue?: boolean, Box$?: _unique.Box | $.VarRef<_unique.Box> | null) { this.Box = Box$ ?? (null! as _unique.Box | $.VarRef<_unique.Box> | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Holder { diff --git a/tests/tests/package_import_reserved_alias/unique/unique.gs.ts b/tests/tests/package_import_reserved_alias/unique/unique.gs.ts index 21d790cae..7c215b6f4 100644 --- a/tests/tests/package_import_reserved_alias/unique/unique.gs.ts +++ b/tests/tests/package_import_reserved_alias/unique/unique.gs.ts @@ -10,7 +10,7 @@ export class Box { constructor(__goscriptValue?: boolean, Value$?: number) { this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Box { diff --git a/tests/tests/package_import_runtime/package_import_runtime.gs.ts b/tests/tests/package_import_runtime/package_import_runtime.gs.ts index 94ebe106e..eae985f1f 100644 --- a/tests/tests/package_import_runtime/package_import_runtime.gs.ts +++ b/tests/tests/package_import_runtime/package_import_runtime.gs.ts @@ -12,7 +12,7 @@ export class counter { constructor(__goscriptValue?: boolean, n$?: number) { this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): counter { @@ -48,7 +48,7 @@ export class box { constructor(__goscriptValue?: boolean, v$?: any) { this.v = v$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): box { diff --git a/tests/tests/package_import_slices/package_import_slices.gs.ts b/tests/tests/package_import_slices/package_import_slices.gs.ts index 38f94ed52..259f3cd3a 100644 --- a/tests/tests/package_import_slices/package_import_slices.gs.ts +++ b/tests/tests/package_import_slices/package_import_slices.gs.ts @@ -62,7 +62,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{group?: number, label?: string}>, __goscriptValue?: boolean) { this.group = init?.group ?? (0 as number) this.label = init?.label ?? ("" as string) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { @@ -160,7 +160,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{n?: number}>, __goscriptValue?: boolean) { this.n = init?.n ?? (0 as number) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): cell { diff --git a/tests/tests/package_import_sort/package_import_sort.gs.ts b/tests/tests/package_import_sort/package_import_sort.gs.ts index d74ff9adc..7033cc062 100644 --- a/tests/tests/package_import_sort/package_import_sort.gs.ts +++ b/tests/tests/package_import_sort/package_import_sort.gs.ts @@ -43,7 +43,7 @@ export class descending { constructor(__goscriptValue?: boolean, values$?: $.Slice) { this.values = values$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): descending { diff --git a/tests/tests/package_import_starpc_srpc/package_import_starpc_srpc.gs.ts b/tests/tests/package_import_starpc_srpc/package_import_starpc_srpc.gs.ts index 317312108..8c532cdf9 100644 --- a/tests/tests/package_import_starpc_srpc/package_import_starpc_srpc.gs.ts +++ b/tests/tests/package_import_starpc_srpc/package_import_starpc_srpc.gs.ts @@ -15,7 +15,7 @@ import "@goscript/github.com/aperturerobotics/protobuf-go-lite/index.js" export class handler { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): handler { @@ -73,7 +73,7 @@ export class embeddedStream { constructor(__goscriptValue?: boolean, Stream$?: srpc.Stream | null) { this.Stream = Stream$ ?? (null! as srpc.Stream | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): embeddedStream { @@ -122,7 +122,7 @@ export class streamOpenResult { constructor(__goscriptValue?: boolean, stream$?: srpc.Stream | null, err$?: $.GoError) { this.stream = stream$ ?? (null! as srpc.Stream | null) this.err = err$ ?? (null! as $.GoError) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): streamOpenResult { @@ -152,7 +152,7 @@ export class streamProbeResult { constructor(__goscriptValue?: boolean, total$?: number, err$?: string) { this.total = total$ ?? 0 this.err = err$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): streamProbeResult { @@ -179,7 +179,7 @@ export class rpcStreamServerResult { constructor(__goscriptValue?: boolean, err$?: string) { this.err = err$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): rpcStreamServerResult { @@ -220,7 +220,7 @@ export class memoryRpcStream { this.send = send$ ?? (null! as $.Channel | null> | null) this.closeSend = closeSend$ ?? $.markAsStructValue(new sync.Once()) this.cancelLocal = cancelLocal$ ?? $.markAsStructValue(new sync.Once()) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): memoryRpcStream { @@ -369,7 +369,7 @@ export class memoryRpcContext { constructor(__goscriptValue?: boolean, done$?: $.Channel<{}> | null, once$?: sync.Once) { this.done = done$ ?? (null! as $.Channel<{}> | null) this.once = once$ ?? $.markAsStructValue(new sync.Once()) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): memoryRpcContext { diff --git a/tests/tests/package_import_stdlib_parity/package_import_stdlib_parity.gs.ts b/tests/tests/package_import_stdlib_parity/package_import_stdlib_parity.gs.ts index f53c9b6a7..f22880436 100644 --- a/tests/tests/package_import_stdlib_parity/package_import_stdlib_parity.gs.ts +++ b/tests/tests/package_import_stdlib_parity/package_import_stdlib_parity.gs.ts @@ -24,7 +24,7 @@ import "@goscript/unicode/index.js" export class xof { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): xof { diff --git a/tests/tests/package_import_sync/package_import_sync.gs.ts b/tests/tests/package_import_sync/package_import_sync.gs.ts index 43e516370..7610c2ef3 100644 --- a/tests/tests/package_import_sync/package_import_sync.gs.ts +++ b/tests/tests/package_import_sync/package_import_sync.gs.ts @@ -12,7 +12,7 @@ export class embeddedMutex { constructor(__goscriptValue?: boolean, Mutex$?: sync.Mutex, value$?: number) { this.Mutex = Mutex$ ?? $.markAsStructValue(new sync.Mutex()) this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): embeddedMutex { @@ -54,7 +54,7 @@ export class embeddedRWMutex { constructor(__goscriptValue?: boolean, RWMutex$?: sync.RWMutex, value$?: number) { this.RWMutex = RWMutex$ ?? $.markAsStructValue(new sync.RWMutex()) this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): embeddedRWMutex { @@ -115,7 +115,7 @@ export class queue { this.Mu = Mu$ ?? $.markAsStructValue(new sync.Mutex()) this.Cond = Cond$ ?? $.markAsStructValue(new sync.Cond()) this.items = items$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): queue { diff --git a/tests/tests/package_import_sync_atomic/package_import_sync_atomic.gs.ts b/tests/tests/package_import_sync_atomic/package_import_sync_atomic.gs.ts index 722b8fc22..f4761b66d 100644 --- a/tests/tests/package_import_sync_atomic/package_import_sync_atomic.gs.ts +++ b/tests/tests/package_import_sync_atomic/package_import_sync_atomic.gs.ts @@ -9,7 +9,7 @@ export class pointerNode { constructor(__goscriptValue?: boolean, value$?: string) { this.value = value$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pointerNode { diff --git a/tests/tests/package_import_text_template/package_import_text_template.gs.ts b/tests/tests/package_import_text_template/package_import_text_template.gs.ts index d7960157b..d7ff325fb 100644 --- a/tests/tests/package_import_text_template/package_import_text_template.gs.ts +++ b/tests/tests/package_import_text_template/package_import_text_template.gs.ts @@ -15,7 +15,7 @@ export class item { constructor(__goscriptValue?: boolean, Name$?: string, Count$?: number) { this.Name = Name$ ?? "" this.Count = Count$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/package_import_typed_slices/package_import_typed_slices.gs.ts b/tests/tests/package_import_typed_slices/package_import_typed_slices.gs.ts index 60b525a30..120fbdab9 100644 --- a/tests/tests/package_import_typed_slices/package_import_typed_slices.gs.ts +++ b/tests/tests/package_import_typed_slices/package_import_typed_slices.gs.ts @@ -20,7 +20,7 @@ export class mesh { constructor(__goscriptValue?: boolean, Pos$?: $.Slice, Index$?: $.Slice) { this.Pos = Pos$ ?? (null! as $.Slice) this.Index = Index$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): mesh { diff --git a/tests/tests/package_import_unique/package_import_unique.gs.ts b/tests/tests/package_import_unique/package_import_unique.gs.ts index cc1a5278b..e475ba1ca 100644 --- a/tests/tests/package_import_unique/package_import_unique.gs.ts +++ b/tests/tests/package_import_unique/package_import_unique.gs.ts @@ -9,7 +9,7 @@ export class zone { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): zone { diff --git a/tests/tests/package_import_x509_create_certificate/package_import_x509_create_certificate.gs.ts b/tests/tests/package_import_x509_create_certificate/package_import_x509_create_certificate.gs.ts index afe0eeee1..079d2793f 100644 --- a/tests/tests/package_import_x509_create_certificate/package_import_x509_create_certificate.gs.ts +++ b/tests/tests/package_import_x509_create_certificate/package_import_x509_create_certificate.gs.ts @@ -24,7 +24,7 @@ export class signedKey { constructor(__goscriptValue?: boolean, PubKey$?: $.Slice, Signature$?: $.Slice) { this.PubKey = PubKey$ ?? (null! as $.Slice) this.Signature = Signature$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): signedKey { diff --git a/tests/tests/package_init_async_lazy_cycle/a.gs.ts b/tests/tests/package_init_async_lazy_cycle/a.gs.ts index 4c8e88c9a..46e2cf27d 100644 --- a/tests/tests/package_init_async_lazy_cycle/a.gs.ts +++ b/tests/tests/package_init_async_lazy_cycle/a.gs.ts @@ -10,7 +10,7 @@ export class holder { constructor(__goscriptValue?: boolean, n$?: number) { this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { diff --git a/tests/tests/package_name_collision/first/ast/ast.gs.ts b/tests/tests/package_name_collision/first/ast/ast.gs.ts index df55bff8a..0ccfe0b1b 100644 --- a/tests/tests/package_name_collision/first/ast/ast.gs.ts +++ b/tests/tests/package_name_collision/first/ast/ast.gs.ts @@ -23,7 +23,7 @@ export class Container { constructor(__goscriptValue?: boolean, Parent$?: Node | null, Children$?: $.Slice) { this.Parent = Parent$ ?? (null! as Node | null) this.Children = Children$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Container { @@ -58,7 +58,7 @@ export class List { constructor(__goscriptValue?: boolean, Container$?: Container, Tight$?: boolean) { this.Container = Container$ ?? new Container(true) this.Tight = Tight$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): List { @@ -89,7 +89,7 @@ export class ListItem { constructor(__goscriptValue?: boolean, Container$?: Container) { this.Container = Container$ ?? new Container(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): ListItem { @@ -119,7 +119,7 @@ export class Paragraph { constructor(__goscriptValue?: boolean, Container$?: Container) { this.Container = Container$ ?? new Container(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Paragraph { @@ -149,7 +149,7 @@ export class Type { constructor(__goscriptValue?: boolean, IDName$?: string) { this.IDName = IDName$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Type { diff --git a/tests/tests/package_name_collision/second/ast/ast.gs.ts b/tests/tests/package_name_collision/second/ast/ast.gs.ts index edda8af43..6d1b3a082 100644 --- a/tests/tests/package_name_collision/second/ast/ast.gs.ts +++ b/tests/tests/package_name_collision/second/ast/ast.gs.ts @@ -20,7 +20,7 @@ export class Type { constructor(__goscriptValue?: boolean, Kind$?: number) { this.Kind = Kind$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Type { @@ -46,7 +46,7 @@ export class List { constructor(__goscriptValue?: boolean, N$?: number) { this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): List { diff --git a/tests/tests/package_tuple_blank_var/package_tuple_blank_var.gs.ts b/tests/tests/package_tuple_blank_var/package_tuple_blank_var.gs.ts index 6d0c2260f..6920663dd 100644 --- a/tests/tests/package_tuple_blank_var/package_tuple_blank_var.gs.ts +++ b/tests/tests/package_tuple_blank_var/package_tuple_blank_var.gs.ts @@ -8,7 +8,7 @@ export class item { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/package_var_deferred_program/tables/tables.gs.ts b/tests/tests/package_var_deferred_program/tables/tables.gs.ts index 46eec45fe..6676ccd33 100644 --- a/tests/tests/package_var_deferred_program/tables/tables.gs.ts +++ b/tests/tests/package_var_deferred_program/tables/tables.gs.ts @@ -13,7 +13,7 @@ export class Codec { constructor(__goscriptValue?: boolean, Name$?: string, Decode$?: Uint8Array) { this.Name = Name$ ?? "" this.Decode = Decode$ ?? $.arrayValue(new Uint8Array(256)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Codec { @@ -40,7 +40,7 @@ export class Counter { constructor(__goscriptValue?: boolean, N$?: number) { this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Counter { diff --git a/tests/tests/package_var_deferred_table/package_var_deferred_table.gs.ts b/tests/tests/package_var_deferred_table/package_var_deferred_table.gs.ts index a9eb3bbcd..b40b2296d 100644 --- a/tests/tests/package_var_deferred_table/package_var_deferred_table.gs.ts +++ b/tests/tests/package_var_deferred_table/package_var_deferred_table.gs.ts @@ -11,7 +11,7 @@ export class Symbol { constructor(__goscriptValue?: boolean, Name$?: string, Kind$?: number) { this.Name = Name$ ?? "" this.Kind = Kind$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Symbol { diff --git a/tests/tests/parallel_assign_pointer_temps/parallel_assign_pointer_temps.gs.ts b/tests/tests/parallel_assign_pointer_temps/parallel_assign_pointer_temps.gs.ts index 5bfe585fe..4b193fb35 100644 --- a/tests/tests/parallel_assign_pointer_temps/parallel_assign_pointer_temps.gs.ts +++ b/tests/tests/parallel_assign_pointer_temps/parallel_assign_pointer_temps.gs.ts @@ -8,7 +8,7 @@ export class node { constructor(__goscriptValue?: boolean, next$?: number) { this.next = next$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): node { @@ -34,7 +34,7 @@ export class queue { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): queue { diff --git a/tests/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.ts b/tests/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.ts index 6edbec224..713a87ebf 100644 --- a/tests/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.ts +++ b/tests/tests/pointer_assignment_no_copy/pointer_assignment_no_copy.gs.ts @@ -11,7 +11,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, MyInt$?: number, MyString$?: string) { this.MyInt = MyInt$ ?? 0 this.MyString = MyString$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.ts b/tests/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.ts index 911300de5..6fffb8e10 100644 --- a/tests/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.ts +++ b/tests/tests/pointer_composite_literal_assignment/pointer_composite_literal_assignment.gs.ts @@ -11,7 +11,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, MyInt$?: number, MyString$?: string) { this.MyInt = MyInt$ ?? 0 this.MyString = MyString$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.ts b/tests/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.ts index 630ce1767..a8f1db6d8 100644 --- a/tests/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.ts +++ b/tests/tests/pointer_deref_multiassign/pointer_deref_multiassign.gs.ts @@ -14,7 +14,7 @@ export class MyStruct { this.MyInt = MyInt$ ?? 0 this.MyString = MyString$ ?? "" this.myBool = myBool$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/pointer_element_identity/pointer_element_identity.gs.ts b/tests/tests/pointer_element_identity/pointer_element_identity.gs.ts index fad4ebf1f..3d33d03c2 100644 --- a/tests/tests/pointer_element_identity/pointer_element_identity.gs.ts +++ b/tests/tests/pointer_element_identity/pointer_element_identity.gs.ts @@ -17,7 +17,7 @@ export class T { constructor(__goscriptValue?: boolean, A$?: number, B$?: number) { this.A = A$ ?? 0 this.B = B$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): T { @@ -44,7 +44,7 @@ export class Inner { constructor(__goscriptValue?: boolean, X$?: number) { this.X = X$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Inner { @@ -76,7 +76,7 @@ export class Outer { this.N = N$ ?? 0 this.In = In$ ?? new Inner(true) this.Ts = Ts$ ?? $.arrayValue(globalThis.Array.from({ length: 2 }, () => new T(true)), /* @__PURE__ */ $.arrayType("main.T", 2)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Outer { @@ -104,7 +104,7 @@ export class holder { constructor(__goscriptValue?: boolean, p$?: T | $.VarRef | null) { this.p = p$ ?? (null! as T | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { @@ -194,7 +194,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{p?: T | $.VarRef | null}>, __goscriptValue?: boolean) { this.p = init?.p ?? (null! as T | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pair { diff --git a/tests/tests/pointer_equal_unsafe_alias/pointer_equal_unsafe_alias.gs.ts b/tests/tests/pointer_equal_unsafe_alias/pointer_equal_unsafe_alias.gs.ts index 96ee508f9..3477a5b14 100644 --- a/tests/tests/pointer_equal_unsafe_alias/pointer_equal_unsafe_alias.gs.ts +++ b/tests/tests/pointer_equal_unsafe_alias/pointer_equal_unsafe_alias.gs.ts @@ -10,7 +10,7 @@ export class first { constructor(__goscriptValue?: boolean, X$?: number) { this.X = X$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): first { @@ -36,7 +36,7 @@ export class second { constructor(__goscriptValue?: boolean, X$?: number) { this.X = X$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): second { diff --git a/tests/tests/pointer_initialization/pointer_initialization.gs.ts b/tests/tests/pointer_initialization/pointer_initialization.gs.ts index ccb7300b4..51baf1cd4 100644 --- a/tests/tests/pointer_initialization/pointer_initialization.gs.ts +++ b/tests/tests/pointer_initialization/pointer_initialization.gs.ts @@ -11,7 +11,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, MyInt$?: number, MyString$?: string) { this.MyInt = MyInt$ ?? 0 this.MyString = MyString$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/pointer_method_direct_call/pointer_method_direct_call.gs.ts b/tests/tests/pointer_method_direct_call/pointer_method_direct_call.gs.ts index 665be6d64..f904c28c1 100644 --- a/tests/tests/pointer_method_direct_call/pointer_method_direct_call.gs.ts +++ b/tests/tests/pointer_method_direct_call/pointer_method_direct_call.gs.ts @@ -18,7 +18,7 @@ export class counter { constructor(__goscriptValue?: boolean, n$?: number) { this.n = n$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): counter { diff --git a/tests/tests/pointer_slice_element_shadow/pointer_slice_element_shadow.gs.ts b/tests/tests/pointer_slice_element_shadow/pointer_slice_element_shadow.gs.ts index 8abd5291a..fa0c21938 100644 --- a/tests/tests/pointer_slice_element_shadow/pointer_slice_element_shadow.gs.ts +++ b/tests/tests/pointer_slice_element_shadow/pointer_slice_element_shadow.gs.ts @@ -8,7 +8,7 @@ export class entry { constructor(__goscriptValue?: boolean, key$?: string) { this.key = key$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): entry { @@ -34,7 +34,7 @@ export class _object { constructor(__goscriptValue?: boolean, entries$?: $.Slice) { this.entries = entries$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): _object { diff --git a/tests/tests/pointer_struct_assign_clone/pointer_struct_assign_clone.gs.ts b/tests/tests/pointer_struct_assign_clone/pointer_struct_assign_clone.gs.ts index 0556541d6..a0ceaeedf 100644 --- a/tests/tests/pointer_struct_assign_clone/pointer_struct_assign_clone.gs.ts +++ b/tests/tests/pointer_struct_assign_clone/pointer_struct_assign_clone.gs.ts @@ -8,7 +8,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, Value$?: number) { this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/pointer_target_locals/pointer_target_locals.gs.ts b/tests/tests/pointer_target_locals/pointer_target_locals.gs.ts index 234b022b1..2d2e1618d 100644 --- a/tests/tests/pointer_target_locals/pointer_target_locals.gs.ts +++ b/tests/tests/pointer_target_locals/pointer_target_locals.gs.ts @@ -14,7 +14,7 @@ export class Node { this.Name = Name$ ?? "" this.Count = Count$ ?? 0 this.Next = Next$ ?? (null! as Node | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Node { @@ -59,7 +59,7 @@ export class Holder { constructor(__goscriptValue?: boolean, items$?: $.Slice) { this.items = items$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Holder { diff --git a/tests/tests/pointers/pointers.gs.ts b/tests/tests/pointers/pointers.gs.ts index 1d5556e4d..3bc0cef6b 100644 --- a/tests/tests/pointers/pointers.gs.ts +++ b/tests/tests/pointers/pointers.gs.ts @@ -8,7 +8,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, Val$?: number) { this.Val = Val$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/private_field_access/private_field_access.gs.ts b/tests/tests/private_field_access/private_field_access.gs.ts index 7f203e508..77eb38762 100644 --- a/tests/tests/private_field_access/private_field_access.gs.ts +++ b/tests/tests/private_field_access/private_field_access.gs.ts @@ -11,7 +11,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, publicField$?: string, privateField$?: number) { this.publicField = publicField$ ?? "" this.privateField = privateField$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/promoted_embedded_struct_interface/promoted_embedded_struct_interface.gs.ts b/tests/tests/promoted_embedded_struct_interface/promoted_embedded_struct_interface.gs.ts index 9c52f6004..dd55802f4 100644 --- a/tests/tests/promoted_embedded_struct_interface/promoted_embedded_struct_interface.gs.ts +++ b/tests/tests/promoted_embedded_struct_interface/promoted_embedded_struct_interface.gs.ts @@ -18,7 +18,7 @@ export class stream { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): stream { @@ -49,7 +49,7 @@ export class stopStream { constructor(__goscriptValue?: boolean, stream$?: stream) { this.stream = stream$ ?? new stream(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): stopStream { @@ -79,7 +79,7 @@ export class pointerStopStream { constructor(__goscriptValue?: boolean, stream$?: stream | $.VarRef | null) { this.stream = stream$ ?? (null! as stream | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pointerStopStream { diff --git a/tests/tests/promoted_external_embedded_method/promoted_external_embedded_method.gs.ts b/tests/tests/promoted_external_embedded_method/promoted_external_embedded_method.gs.ts index d8d4eecdd..77e5f16d1 100644 --- a/tests/tests/promoted_external_embedded_method/promoted_external_embedded_method.gs.ts +++ b/tests/tests/promoted_external_embedded_method/promoted_external_embedded_method.gs.ts @@ -19,7 +19,7 @@ export class raw { constructor(__goscriptValue?: boolean, Mutex$?: sync.Mutex) { this.Mutex = Mutex$ ?? $.markAsStructValue(new sync.Mutex()) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): raw { @@ -57,7 +57,7 @@ export class outer { constructor(__goscriptValue?: boolean, raw$?: raw) { this.raw = raw$ ?? new raw(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): outer { @@ -95,7 +95,7 @@ export class rawRW { constructor(__goscriptValue?: boolean, RWMutex$?: sync.RWMutex) { this.RWMutex = RWMutex$ ?? $.markAsStructValue(new sync.RWMutex()) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): rawRW { @@ -149,7 +149,7 @@ export class outerRW { constructor(__goscriptValue?: boolean, rawRW$?: rawRW) { this.rawRW = rawRW$ ?? new rawRW(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): outerRW { @@ -203,7 +203,7 @@ export class rawRunner { constructor(__goscriptValue?: boolean, runner$?: runner | null) { this.runner = runner$ ?? (null! as runner | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): rawRunner { @@ -233,7 +233,7 @@ export class outerRunner { constructor(__goscriptValue?: boolean, rawRunner$?: rawRunner) { this.rawRunner = rawRunner$ ?? new rawRunner(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): outerRunner { @@ -260,7 +260,7 @@ export class outerRunner { export class runnable { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): runnable { diff --git a/tests/tests/promoted_method_call/promoted_method_call.gs.ts b/tests/tests/promoted_method_call/promoted_method_call.gs.ts index 70daab50c..7cd137134 100644 --- a/tests/tests/promoted_method_call/promoted_method_call.gs.ts +++ b/tests/tests/promoted_method_call/promoted_method_call.gs.ts @@ -8,7 +8,7 @@ export class base { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): base { @@ -39,7 +39,7 @@ export class wrapper { constructor(__goscriptValue?: boolean, base$?: base) { this.base = base$ ?? new base(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): wrapper { diff --git a/tests/tests/promoted_pointer_fields/promoted_pointer_fields.gs.ts b/tests/tests/promoted_pointer_fields/promoted_pointer_fields.gs.ts index 9f1b4cf86..207bf38d7 100644 --- a/tests/tests/promoted_pointer_fields/promoted_pointer_fields.gs.ts +++ b/tests/tests/promoted_pointer_fields/promoted_pointer_fields.gs.ts @@ -8,7 +8,7 @@ export class counter { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): counter { @@ -42,7 +42,7 @@ export class inner { constructor(__goscriptValue?: boolean, name$?: string, count$?: counter) { this.name = name$ ?? "" this.count = count$ ?? new counter(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): inner { @@ -69,7 +69,7 @@ export class outer { constructor(__goscriptValue?: boolean, inner$?: inner | $.VarRef | null) { this.inner = inner$ ?? (null! as inner | $.VarRef | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): outer { diff --git a/tests/tests/quic_loss_frame_handler/quic_loss_frame_handler.gs.ts b/tests/tests/quic_loss_frame_handler/quic_loss_frame_handler.gs.ts index 27ad0730a..1ef7eb05c 100644 --- a/tests/tests/quic_loss_frame_handler/quic_loss_frame_handler.gs.ts +++ b/tests/tests/quic_loss_frame_handler/quic_loss_frame_handler.gs.ts @@ -26,7 +26,7 @@ $.registerInterfaceType( export class pingFrame { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): pingFrame { @@ -57,7 +57,7 @@ export class Frame { constructor(__goscriptValue?: boolean, Frame$?: wireFrame | null, Handler$?: FrameHandler | null) { this.Frame = Frame$ ?? (null! as wireFrame | null) this.Handler = Handler$ ?? (null! as FrameHandler | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Frame { @@ -84,7 +84,7 @@ export class packet { constructor(__goscriptValue?: boolean, Frames$?: $.Slice) { this.Frames = Frames$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): packet { @@ -110,7 +110,7 @@ export class retransmissionQueue { constructor(__goscriptValue?: boolean, lost$?: number) { this.lost = lost$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): retransmissionQueue { @@ -151,7 +151,7 @@ export class retransmissionQueueInitialAckHandler { constructor(__goscriptValue?: boolean, lost$?: number) { this.lost = lost$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): retransmissionQueueInitialAckHandler { @@ -188,7 +188,7 @@ export class retransmissionQueueHandshakeAckHandler { constructor(__goscriptValue?: boolean, lost$?: number) { this.lost = lost$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): retransmissionQueueHandshakeAckHandler { @@ -225,7 +225,7 @@ export class retransmissionQueueAppDataAckHandler { constructor(__goscriptValue?: boolean, lost$?: number) { this.lost = lost$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): retransmissionQueueAppDataAckHandler { diff --git a/tests/tests/range_assign_existing/range_assign_existing.gs.ts b/tests/tests/range_assign_existing/range_assign_existing.gs.ts index c232b16ba..7c558f39e 100644 --- a/tests/tests/range_assign_existing/range_assign_existing.gs.ts +++ b/tests/tests/range_assign_existing/range_assign_existing.gs.ts @@ -14,7 +14,7 @@ export class Vec { this.X = X$ ?? 0 this.Y = Y$ ?? 0 this.Z = Z$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Vec { @@ -45,7 +45,7 @@ export class Pos { constructor(__goscriptValue?: boolean, I$?: number, J$?: number) { this.I = I$ ?? 0 this.J = J$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pos { diff --git a/tests/tests/range_func_async_method_value/range_func_async_method_value.gs.ts b/tests/tests/range_func_async_method_value/range_func_async_method_value.gs.ts index 58262b596..da4cf2699 100644 --- a/tests/tests/range_func_async_method_value/range_func_async_method_value.gs.ts +++ b/tests/tests/range_func_async_method_value/range_func_async_method_value.gs.ts @@ -18,7 +18,7 @@ export class listProvider { constructor(__goscriptValue?: boolean, items$?: $.Slice | null>) { this.items = items$ ?? (null! as $.Slice | null>) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): listProvider { @@ -52,7 +52,7 @@ export class Group { constructor(__goscriptValue?: boolean, provider$?: provider | null, seen$?: boolean) { this.provider = provider$ ?? (null! as provider | null) this.seen = seen$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Group { diff --git a/tests/tests/range_index_window_access/range_index_window_access.gs.ts b/tests/tests/range_index_window_access/range_index_window_access.gs.ts index 32d06e703..b5d155ee2 100644 --- a/tests/tests/range_index_window_access/range_index_window_access.gs.ts +++ b/tests/tests/range_index_window_access/range_index_window_access.gs.ts @@ -11,7 +11,7 @@ export class P { constructor(__goscriptValue?: boolean, X$?: number, Y$?: number) { this.X = X$ ?? 0 this.Y = Y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): P { diff --git a/tests/tests/range_shadow_rhs/range_shadow_rhs.gs.ts b/tests/tests/range_shadow_rhs/range_shadow_rhs.gs.ts index 6e534b38c..f97a86d30 100644 --- a/tests/tests/range_shadow_rhs/range_shadow_rhs.gs.ts +++ b/tests/tests/range_shadow_rhs/range_shadow_rhs.gs.ts @@ -11,7 +11,7 @@ export class holder { constructor(__goscriptValue?: boolean, values$?: globalThis.Map | null, items$?: $.Slice) { this.values = values$ ?? (null! as globalThis.Map | null) this.items = items$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { @@ -38,7 +38,7 @@ export class item { constructor(__goscriptValue?: boolean, value$?: number) { this.value = value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/range_shadow_struct_field/range_shadow_struct_field.gs.ts b/tests/tests/range_shadow_struct_field/range_shadow_struct_field.gs.ts index 5f332a30e..b9eb1a25b 100644 --- a/tests/tests/range_shadow_struct_field/range_shadow_struct_field.gs.ts +++ b/tests/tests/range_shadow_struct_field/range_shadow_struct_field.gs.ts @@ -8,7 +8,7 @@ export class Match { constructor(__goscriptValue?: boolean, Size$?: number) { this.Size = Size$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Match { @@ -34,7 +34,7 @@ export class Matcher { constructor(__goscriptValue?: boolean, matches$?: $.Slice) { this.matches = matches$ ?? (null! as $.Slice) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Matcher { diff --git a/tests/tests/range_value_pointer_receiver/range_value_pointer_receiver.gs.ts b/tests/tests/range_value_pointer_receiver/range_value_pointer_receiver.gs.ts index 4c4c2a897..d9f4476b8 100644 --- a/tests/tests/range_value_pointer_receiver/range_value_pointer_receiver.gs.ts +++ b/tests/tests/range_value_pointer_receiver/range_value_pointer_receiver.gs.ts @@ -8,7 +8,7 @@ export class item { constructor(__goscriptValue?: boolean, name$?: string) { this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): item { diff --git a/tests/tests/range_value_share/range_value_share.gs.ts b/tests/tests/range_value_share/range_value_share.gs.ts index 0de949fda..cd04b9313 100644 --- a/tests/tests/range_value_share/range_value_share.gs.ts +++ b/tests/tests/range_value_share/range_value_share.gs.ts @@ -11,7 +11,7 @@ export class point { constructor(__goscriptValue?: boolean, X$?: number, Y$?: number) { this.X = X$ ?? 0 this.Y = Y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): point { @@ -44,7 +44,7 @@ export class box { this.Min = Min$ ?? new point(true) this.Max = Max$ ?? new point(true) this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): box { diff --git a/tests/tests/read_only_effect_free_call/read_only_effect_free_call.gs.ts b/tests/tests/read_only_effect_free_call/read_only_effect_free_call.gs.ts index 96c716196..87dff7b16 100644 --- a/tests/tests/read_only_effect_free_call/read_only_effect_free_call.gs.ts +++ b/tests/tests/read_only_effect_free_call/read_only_effect_free_call.gs.ts @@ -11,7 +11,7 @@ export class vec { constructor(__goscriptValue?: boolean, x$?: number, y$?: number) { this.x = x$ ?? 0 this.y = y$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): vec { @@ -54,7 +54,7 @@ export class holder { constructor(__goscriptValue?: boolean, pos$?: vec) { this.pos = pos$ ?? new vec(true) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { diff --git a/tests/tests/receiver_binding/storage.gs.ts b/tests/tests/receiver_binding/storage.gs.ts index 12006ee5b..30f012a82 100644 --- a/tests/tests/receiver_binding/storage.gs.ts +++ b/tests/tests/receiver_binding/storage.gs.ts @@ -13,7 +13,7 @@ export class storage { constructor(__goscriptValue?: boolean, bytes$?: $.Slice, name$?: string) { this.bytes = bytes$ ?? (null! as $.Slice) this.name = name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): storage { diff --git a/tests/tests/receiver_method/main.gs.ts b/tests/tests/receiver_method/main.gs.ts index 6ac64305f..ce19e6a5f 100644 --- a/tests/tests/receiver_method/main.gs.ts +++ b/tests/tests/receiver_method/main.gs.ts @@ -8,7 +8,7 @@ export class MyStruct { constructor(__goscriptValue?: boolean, Value$?: number) { this.Value = Value$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): MyStruct { diff --git a/tests/tests/recursive_type_definition/recursive_type_definition.gs.ts b/tests/tests/recursive_type_definition/recursive_type_definition.gs.ts index f088d9910..7fdc974e3 100644 --- a/tests/tests/recursive_type_definition/recursive_type_definition.gs.ts +++ b/tests/tests/recursive_type_definition/recursive_type_definition.gs.ts @@ -35,7 +35,7 @@ $.registerInterfaceType( export class B { constructor(__goscriptValue?: boolean) { - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): B { diff --git a/tests/tests/reflect_array_interface/reflect_array_interface.gs.ts b/tests/tests/reflect_array_interface/reflect_array_interface.gs.ts index a0bc0dcde..857cf6c60 100644 --- a/tests/tests/reflect_array_interface/reflect_array_interface.gs.ts +++ b/tests/tests/reflect_array_interface/reflect_array_interface.gs.ts @@ -23,7 +23,7 @@ export class Grid { this.N = N$ ?? $.arrayValue(globalThis.Array.from({ length: 2 }, () => 0)) this.F = F$ ?? $.arrayValue(globalThis.Array.from({ length: 3 }, () => 0), /* @__PURE__ */ $.arrayType(/* @__PURE__ */ $.basicType("float32"), 3)) this.B = B$ ?? $.arrayValue(globalThis.Array.from({ length: 2 }, () => false)) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Grid { diff --git a/tests/tests/reflect_convert_float32/reflect_convert_float32.gs.ts b/tests/tests/reflect_convert_float32/reflect_convert_float32.gs.ts index 37e4dfc8b..1cbf8704d 100644 --- a/tests/tests/reflect_convert_float32/reflect_convert_float32.gs.ts +++ b/tests/tests/reflect_convert_float32/reflect_convert_float32.gs.ts @@ -12,7 +12,7 @@ export class T { constructor(__goscriptValue?: boolean, A$?: string, B$?: number) { this.A = A$ ?? "" this.B = B$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): T { diff --git a/tests/tests/reflect_deepequal_pointers/reflect_deepequal_pointers.gs.ts b/tests/tests/reflect_deepequal_pointers/reflect_deepequal_pointers.gs.ts index cbb3b6eda..d19b269a0 100644 --- a/tests/tests/reflect_deepequal_pointers/reflect_deepequal_pointers.gs.ts +++ b/tests/tests/reflect_deepequal_pointers/reflect_deepequal_pointers.gs.ts @@ -12,7 +12,7 @@ export class Inner { constructor(__goscriptValue?: boolean, Name$?: string, N$?: number) { this.Name = Name$ ?? "" this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Inner { @@ -57,7 +57,7 @@ export class Outer { this.PM = PM$ ?? (null! as globalThis.Map | null> | null) this.In = In$ ?? new Inner(true) this.Ptrs = Ptrs$ ?? (null! as $.Slice<$.VarRef | null>) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Outer { @@ -152,7 +152,7 @@ export async function main(): globalThis.Promise { constructor(init?: Partial<{A?: any, B?: any}>, __goscriptValue?: boolean) { this.A = init?.A ?? (null! as any) this.B = init?.B ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Holder { diff --git a/tests/tests/reflect_elem_struct_pointer/reflect_elem_struct_pointer.gs.ts b/tests/tests/reflect_elem_struct_pointer/reflect_elem_struct_pointer.gs.ts index 43c19f7e2..b577b42d4 100644 --- a/tests/tests/reflect_elem_struct_pointer/reflect_elem_struct_pointer.gs.ts +++ b/tests/tests/reflect_elem_struct_pointer/reflect_elem_struct_pointer.gs.ts @@ -32,7 +32,7 @@ export class T { constructor(__goscriptValue?: boolean, A$?: string, B$?: number) { this.A = A$ ?? "" this.B = B$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): T { @@ -59,7 +59,7 @@ export class square { constructor(__goscriptValue?: boolean, Side$?: number) { this.Side = Side$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): square { @@ -93,7 +93,7 @@ export class holder { constructor(__goscriptValue?: boolean, S$?: shape | null, A$?: any) { this.S = S$ ?? (null! as shape | null) this.A = A$ ?? (null! as any) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): holder { @@ -123,7 +123,7 @@ export class base { constructor(__goscriptValue?: boolean, This$?: node | null, Name$?: string) { this.This = This$ ?? (null! as node | null) this.Name = Name$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): base { @@ -163,7 +163,7 @@ export class widget { constructor(__goscriptValue?: boolean, base$?: base, X$?: number) { this.base = base$ ?? new base(true) this.X = X$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): widget { @@ -201,7 +201,7 @@ export class body { constructor(__goscriptValue?: boolean, widget$?: widget, Title$?: string) { this.widget = widget$ ?? new widget(true) this.Title = Title$ ?? "" - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): body { diff --git a/tests/tests/reflect_generic_field_types/reflect_generic_field_types.gs.ts b/tests/tests/reflect_generic_field_types/reflect_generic_field_types.gs.ts index 61268fd73..04243d663 100644 --- a/tests/tests/reflect_generic_field_types/reflect_generic_field_types.gs.ts +++ b/tests/tests/reflect_generic_field_types/reflect_generic_field_types.gs.ts @@ -12,7 +12,7 @@ export class Item { constructor(__goscriptValue?: boolean, Name$?: string, N$?: number) { this.Name = Name$ ?? "" this.N = N$ ?? 0 - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Item { @@ -42,7 +42,7 @@ export class Option { constructor(__goscriptValue?: boolean, Value$?: any, Valid$?: boolean) { this.Value = Value$ ?? (null! as any) this.Valid = Valid$ ?? false - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Option { @@ -75,7 +75,7 @@ export class List { this.Values = Values$ ?? (null! as $.Slice) this.Keys = Keys$ ?? (null! as $.Slice) this.index = index$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): List { @@ -109,7 +109,7 @@ export class Pair { this.First = First$ ?? (null! as any) this.Second = Second$ ?? (null! as any) this.Both = Both$ ?? (null! as globalThis.Map | null) - ;(this as any)[$.structValueMarker] = __goscriptValue === true + ;(this as any).__goStructValue = __goscriptValue === true } public clone(): Pair { @@ -146,7 +146,7 @@ export class Data { this.List = List$ ?? new List(true) this.Pair = Pair$ ?? new Pair(true, 0) this.OptP = OptP$ ?? (null! as Option | $.VarRef