@@ -3844,6 +3844,10 @@ declare module "assemblyscript/src/program" {
38443844 prototype : FieldPrototype ;
38453845 /** Field memory offset, if an instance field. */
38463846 memoryOffset : number ;
3847+ /** Getter function reference, if compiled. */
3848+ getterRef : FunctionRef ;
3849+ /** Setter function reference, if compiled. */
3850+ setterRef : FunctionRef ;
38473851 /** Constructs a new field. */
38483852 constructor (
38493853 /** Respective field prototype. */
@@ -3852,6 +3856,10 @@ declare module "assemblyscript/src/program" {
38523856 parent : Class ,
38533857 /** Concrete type. */
38543858 type : Type ) ;
3859+ /** Gets the internal name of the respective getter function. */
3860+ get internalGetterName ( ) : string ;
3861+ /** Gets the internal name of the respective setter function. */
3862+ get internalSetterName ( ) : string ;
38553863 }
38563864 /** A property comprised of a getter and a setter function. */
38573865 export class PropertyPrototype extends DeclaredElement {
@@ -4019,7 +4027,7 @@ declare module "assemblyscript/src/compiler" {
40194027 import { DiagnosticEmitter } from "assemblyscript/src/diagnostics" ;
40204028 import { Module , MemorySegment , ExpressionRef , NativeType , GlobalRef } from "assemblyscript/src/module" ;
40214029 import { Feature , Target } from "assemblyscript/src/common" ;
4022- import { Program , Class , Element , Enum , Function , Global , VariableLikeElement , File } from "assemblyscript/src/program" ;
4030+ import { Program , Class , Element , Enum , Field , Function , Global , Property , VariableLikeElement , File } from "assemblyscript/src/program" ;
40234031 import { Flow } from "assemblyscript/src/flow" ;
40244032 import { Resolver } from "assemblyscript/src/resolver" ;
40254033 import { Node , Range , Statement , Expression } from "assemblyscript/src/ast" ;
@@ -4154,10 +4162,6 @@ declare module "assemblyscript/src/compiler" {
41544162 private ensureModuleExports ;
41554163 /** Applies the respective module export(s) for the specified element. */
41564164 private ensureModuleExport ;
4157- /** Makes an exported function to get the value of an instance field. */
4158- private makeExportedFieldGetter ;
4159- /** Makes an exported function to set the value of an instance field. */
4160- private makeExportedFieldSetter ;
41614165 /** Compiles any element. */
41624166 compileElement ( element : Element , compileMembers ?: boolean ) : void ;
41634167 /** Compiles a file's exports. */
@@ -4180,6 +4184,17 @@ declare module "assemblyscript/src/compiler" {
41804184 private compileFunctionBody ;
41814185 /** Compiles a priorly resolved class. */
41824186 compileClass ( instance : Class ) : boolean ;
4187+ /** Compiles an instance field to a getter and a setter. */
4188+ compileField ( instance : Field ) : boolean ;
4189+ /** Compiles the getter of the specified instance field. */
4190+ compileFieldGetter ( instance : Field ) : boolean ;
4191+ /** Compiles the setter of the specified instance field. */
4192+ compileFieldSetter ( instance : Field ) : boolean ;
4193+ /** Compiles a property to a getter and potentially a setter. */
4194+ compileProperty ( instance : Property ) : boolean ;
4195+ compilePropertyGetter ( instance : Property ) : boolean ;
4196+ /** Compiles the setter of the specified property. */
4197+ compilePropertySetter ( instance : Property ) : boolean ;
41834198 /** Adds a static memory segment with the specified data. */
41844199 addMemorySegment ( buffer : Uint8Array , alignment ?: number ) : MemorySegment ;
41854200 /** Ensures that a string exists in static memory and returns a pointer to it. Deduplicates. */
0 commit comments