@@ -237,6 +237,9 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
237
237
_0_must_be_a_power_of_two = 223 ,
238
238
_0_is_not_a_valid_operator = 224 ,
239
239
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 ,
240
243
Unterminated_string_literal = 1002 ,
241
244
Identifier_expected = 1003 ,
242
245
_0_expected = 1005 ,
@@ -610,12 +613,6 @@ declare module "assemblyscript/src/diagnostics" {
610
613
private constructor ( ) ;
611
614
/** Creates a new diagnostic message of the specified category. */
612
615
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 ;
619
616
/** Adds a source range to this message. */
620
617
withRange ( range : Range ) : this;
621
618
/** Adds a related source range to this message. */
@@ -636,17 +633,17 @@ declare module "assemblyscript/src/diagnostics" {
636
633
/** Initializes this diagnostic emitter. */
637
634
protected constructor ( diagnostics ?: DiagnosticMessage [ ] | null ) ;
638
635
/** 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 ;
640
637
/** 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 ;
642
639
/** Emits an informatory diagnostic message with a related range. */
643
640
infoRelated ( code : DiagnosticCode , range : Range , relatedRange : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
644
641
/** 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 ;
646
643
/** Emits a warning diagnostic message with a related range. */
647
644
warningRelated ( code : DiagnosticCode , range : Range , relatedRange : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
648
645
/** 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 ;
650
647
/** Emits an error diagnostic message with a related range. */
651
648
errorRelated ( code : DiagnosticCode , range : Range , relatedRange : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
652
649
}
@@ -3310,7 +3307,7 @@ declare module "assemblyscript/src/program" {
3310
3307
/** Registers the backing class of a native type. */
3311
3308
private registerWrapperClass ;
3312
3309
/** Registers a constant integer value within the global scope. */
3313
- private registerConstantInteger ;
3310
+ registerConstantInteger ( name : string , type : Type , value : I64 ) : void ;
3314
3311
/** Registers a constant float value within the global scope. */
3315
3312
private registerConstantFloat ;
3316
3313
/** Ensures that the given global element exists. Attempts to merge duplicates. */
@@ -3360,6 +3357,9 @@ declare module "assemblyscript/src/program" {
3360
3357
private initializeTypeDefinition ;
3361
3358
/** Initializes a variable statement. */
3362
3359
private initializeVariables ;
3360
+ /** Determines the element type of a built-in array. */
3361
+ /** Finds all cyclic classes. */
3362
+ findCyclicClasses ( ) : Set < Class > ;
3363
3363
}
3364
3364
/** Indicates the specific kind of an {@link Element}. */
3365
3365
export enum ElementKind {
@@ -4050,6 +4050,8 @@ declare module "assemblyscript/src/compiler" {
4050
4050
features : Feature ;
4051
4051
/** If true, disallows unsafe features in user code. */
4052
4052
noUnsafe : boolean ;
4053
+ /** If true, enables pedantic diagnostics. */
4054
+ pedantic : boolean ;
4053
4055
/** Hinted optimize level. Not applied by the compiler itself. */
4054
4056
optimizeLevelHint : number ;
4055
4057
/** Hinted shrink level. Not applied by the compiler itself. */
@@ -4062,6 +4064,8 @@ declare module "assemblyscript/src/compiler" {
4062
4064
get isizeType ( ) : Type ;
4063
4065
/** Gets the native size type matching the target. */
4064
4066
get nativeSizeType ( ) : NativeType ;
4067
+ /** Gets if any optimizations will be performed. */
4068
+ get willOptimize ( ) : boolean ;
4065
4069
/** Tests if a specific feature is activated. */
4066
4070
hasFeature ( feature : Feature ) : boolean ;
4067
4071
}
@@ -4138,6 +4142,8 @@ declare module "assemblyscript/src/compiler" {
4138
4142
skippedAutoreleases : Set < ExpressionRef > ;
4139
4143
/** Current inline functions stack. */
4140
4144
inlineStack : Function [ ] ;
4145
+ /** Lazily compiled library functions. */
4146
+ lazyLibraryFunctions : Set < Function > ;
4141
4147
/** Compiles a {@link Program} to a {@link Module} using the specified options. */
4142
4148
static compile ( program : Program ) : Module ;
4143
4149
/** Constructs a new compiler for a {@link Program} using the specified options. */
@@ -5038,6 +5044,8 @@ declare module "assemblyscript/src/index" {
5038
5044
export function disableFeature ( options : Options , feature : Feature ) : void ;
5039
5045
/** Gives the compiler a hint at the optimize levels that will be used later on. */
5040
5046
export function setOptimizeLevelHints ( options : Options , optimizeLevel : number , shrinkLevel : number ) : void ;
5047
+ /** Sets the `pedantic` option. */
5048
+ export function setPedantic ( options : Options , pedantic : boolean ) : void ;
5041
5049
/** Creates a new Program. */
5042
5050
export function newProgram ( options : Options ) : Program ;
5043
5051
/** Obtains the next diagnostic message. Returns `null` once complete. */
0 commit comments