@@ -237,6 +237,9 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
237237 _0_must_be_a_power_of_two = 223 ,
238238 _0_is_not_a_valid_operator = 224 ,
239239 Expression_cannot_be_represented_by_a_type = 225 ,
240+ Type_0_is_cyclic_Module_will_include_deferred_garbage_collection = 900 ,
241+ Importing_the_table_disables_some_indirect_call_optimizations = 901 ,
242+ Exporting_the_table_disables_some_indirect_call_optimizations = 902 ,
240243 Unterminated_string_literal = 1002 ,
241244 Identifier_expected = 1003 ,
242245 _0_expected = 1005 ,
@@ -610,12 +613,6 @@ declare module "assemblyscript/src/diagnostics" {
610613 private constructor ( ) ;
611614 /** Creates a new diagnostic message of the specified category. */
612615 static create ( code : DiagnosticCode , category : DiagnosticCategory , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : DiagnosticMessage ;
613- /** Creates a new informatory diagnostic message. */
614- static createInfo ( code : DiagnosticCode , arg0 ?: string | null , arg1 ?: string | null ) : DiagnosticMessage ;
615- /** Creates a new warning diagnostic message. */
616- static createWarning ( code : DiagnosticCode , arg0 ?: string | null , arg1 ?: string | null ) : DiagnosticMessage ;
617- /** Creates a new error diagnostic message. */
618- static createError ( code : DiagnosticCode , arg0 ?: string | null , arg1 ?: string | null ) : DiagnosticMessage ;
619616 /** Adds a source range to this message. */
620617 withRange ( range : Range ) : this;
621618 /** Adds a related source range to this message. */
@@ -636,17 +633,17 @@ declare module "assemblyscript/src/diagnostics" {
636633 /** Initializes this diagnostic emitter. */
637634 protected constructor ( diagnostics ?: DiagnosticMessage [ ] | null ) ;
638635 /** Emits a diagnostic message of the specified category. */
639- emitDiagnostic ( code : DiagnosticCode , category : DiagnosticCategory , range : Range , relatedRange : Range | null , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
636+ emitDiagnostic ( code : DiagnosticCode , category : DiagnosticCategory , range : Range | null , relatedRange : Range | null , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
640637 /** Emits an informatory diagnostic message. */
641- info ( code : DiagnosticCode , range : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
638+ info ( code : DiagnosticCode , range : Range | null , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
642639 /** Emits an informatory diagnostic message with a related range. */
643640 infoRelated ( code : DiagnosticCode , range : Range , relatedRange : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
644641 /** Emits a warning diagnostic message. */
645- warning ( code : DiagnosticCode , range : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
642+ warning ( code : DiagnosticCode , range : Range | null , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
646643 /** Emits a warning diagnostic message with a related range. */
647644 warningRelated ( code : DiagnosticCode , range : Range , relatedRange : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
648645 /** Emits an error diagnostic message. */
649- error ( code : DiagnosticCode , range : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
646+ error ( code : DiagnosticCode , range : Range | null , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
650647 /** Emits an error diagnostic message with a related range. */
651648 errorRelated ( code : DiagnosticCode , range : Range , relatedRange : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
652649 }
@@ -3310,7 +3307,7 @@ declare module "assemblyscript/src/program" {
33103307 /** Registers the backing class of a native type. */
33113308 private registerWrapperClass ;
33123309 /** Registers a constant integer value within the global scope. */
3313- private registerConstantInteger ;
3310+ registerConstantInteger ( name : string , type : Type , value : I64 ) : void ;
33143311 /** Registers a constant float value within the global scope. */
33153312 private registerConstantFloat ;
33163313 /** Ensures that the given global element exists. Attempts to merge duplicates. */
@@ -3360,6 +3357,9 @@ declare module "assemblyscript/src/program" {
33603357 private initializeTypeDefinition ;
33613358 /** Initializes a variable statement. */
33623359 private initializeVariables ;
3360+ /** Determines the element type of a built-in array. */
3361+ /** Finds all cyclic classes. */
3362+ findCyclicClasses ( ) : Set < Class > ;
33633363 }
33643364 /** Indicates the specific kind of an {@link Element}. */
33653365 export enum ElementKind {
@@ -4050,6 +4050,8 @@ declare module "assemblyscript/src/compiler" {
40504050 features : Feature ;
40514051 /** If true, disallows unsafe features in user code. */
40524052 noUnsafe : boolean ;
4053+ /** If true, enables pedantic diagnostics. */
4054+ pedantic : boolean ;
40534055 /** Hinted optimize level. Not applied by the compiler itself. */
40544056 optimizeLevelHint : number ;
40554057 /** Hinted shrink level. Not applied by the compiler itself. */
@@ -4062,6 +4064,8 @@ declare module "assemblyscript/src/compiler" {
40624064 get isizeType ( ) : Type ;
40634065 /** Gets the native size type matching the target. */
40644066 get nativeSizeType ( ) : NativeType ;
4067+ /** Gets if any optimizations will be performed. */
4068+ get willOptimize ( ) : boolean ;
40654069 /** Tests if a specific feature is activated. */
40664070 hasFeature ( feature : Feature ) : boolean ;
40674071 }
@@ -4138,6 +4142,8 @@ declare module "assemblyscript/src/compiler" {
41384142 skippedAutoreleases : Set < ExpressionRef > ;
41394143 /** Current inline functions stack. */
41404144 inlineStack : Function [ ] ;
4145+ /** Lazily compiled library functions. */
4146+ lazyLibraryFunctions : Set < Function > ;
41414147 /** Compiles a {@link Program} to a {@link Module} using the specified options. */
41424148 static compile ( program : Program ) : Module ;
41434149 /** Constructs a new compiler for a {@link Program} using the specified options. */
@@ -5038,6 +5044,8 @@ declare module "assemblyscript/src/index" {
50385044 export function disableFeature ( options : Options , feature : Feature ) : void ;
50395045 /** Gives the compiler a hint at the optimize levels that will be used later on. */
50405046 export function setOptimizeLevelHints ( options : Options , optimizeLevel : number , shrinkLevel : number ) : void ;
5047+ /** Sets the `pedantic` option. */
5048+ export function setPedantic ( options : Options , pedantic : boolean ) : void ;
50415049 /** Creates a new Program. */
50425050 export function newProgram ( options : Options ) : Program ;
50435051 /** Obtains the next diagnostic message. Returns `null` once complete. */
0 commit comments