@@ -240,6 +240,8 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
240
240
Type_0_is_cyclic_Module_will_include_deferred_garbage_collection = 900 ,
241
241
Importing_the_table_disables_some_indirect_call_optimizations = 901 ,
242
242
Exporting_the_table_disables_some_indirect_call_optimizations = 902 ,
243
+ Expression_compiles_to_a_dynamic_check_at_runtime = 903 ,
244
+ Indexed_access_may_involve_bounds_checking = 904 ,
243
245
Unterminated_string_literal = 1002 ,
244
246
Identifier_expected = 1003 ,
245
247
_0_expected = 1005 ,
@@ -578,12 +580,14 @@ declare module "assemblyscript/src/diagnostics" {
578
580
export { DiagnosticCode , diagnosticCodeToString } from "assemblyscript/src/diagnosticMessages.generated" ;
579
581
/** Indicates the category of a {@link DiagnosticMessage}. */
580
582
export enum DiagnosticCategory {
583
+ /** Overly pedantic message. */
584
+ PEDANTIC = 0 ,
581
585
/** Informatory message. */
582
- INFO = 0 ,
586
+ INFO = 1 ,
583
587
/** Warning message. */
584
- WARNING = 1 ,
588
+ WARNING = 2 ,
585
589
/** Error message. */
586
- ERROR = 2
590
+ ERROR = 3
587
591
}
588
592
/** Returns the string representation of the specified diagnostic category. */
589
593
export function diagnosticCategoryToString ( category : DiagnosticCategory ) : string ;
@@ -593,6 +597,8 @@ declare module "assemblyscript/src/diagnostics" {
593
597
export const COLOR_YELLOW : string ;
594
598
/** ANSI escape sequence for red foreground. */
595
599
export const COLOR_RED : string ;
600
+ /** ANSI escape sequence for magenta foreground. */
601
+ export const COLOR_MAGENTA : string ;
596
602
/** ANSI escape sequence to reset the foreground color. */
597
603
export const COLOR_RESET : string ;
598
604
/** Returns the ANSI escape sequence for the specified category. */
@@ -634,6 +640,10 @@ declare module "assemblyscript/src/diagnostics" {
634
640
protected constructor ( diagnostics ?: DiagnosticMessage [ ] | null ) ;
635
641
/** Emits a diagnostic message of the specified category. */
636
642
emitDiagnostic ( code : DiagnosticCode , category : DiagnosticCategory , range : Range | null , relatedRange : Range | null , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
643
+ /** Emits an overly pedantic diagnostic message. */
644
+ pedantic ( code : DiagnosticCode , range : Range | null , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
645
+ /** Emits an overly pedantic diagnostic message with a related range. */
646
+ pedanticRelated ( code : DiagnosticCode , range : Range , relatedRange : Range , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
637
647
/** Emits an informatory diagnostic message. */
638
648
info ( code : DiagnosticCode , range : Range | null , arg0 ?: string | null , arg1 ?: string | null , arg2 ?: string | null ) : void ;
639
649
/** Emits an informatory diagnostic message with a related range. */
@@ -2322,6 +2332,21 @@ declare module "assemblyscript/src/module" {
2322
2332
addBranchForSwitch ( from : number , to : number , indexes : number [ ] , code ?: ExpressionRef ) : void ;
2323
2333
renderAndDispose ( entry : number , labelHelper : Index ) : ExpressionRef ;
2324
2334
}
2335
+ export enum SideEffects {
2336
+ None = 0 ,
2337
+ Branches = 1 ,
2338
+ Calls = 2 ,
2339
+ ReadsLocal = 4 ,
2340
+ WritesLocal = 8 ,
2341
+ ReadsGlobal = 16 ,
2342
+ WritesGlobal = 32 ,
2343
+ ReadsMemory = 64 ,
2344
+ WritesMemory = 128 ,
2345
+ ImplicitTrap = 256 ,
2346
+ IsAtomic = 512 ,
2347
+ Any = 1023
2348
+ }
2349
+ export function getSideEffects ( expr : ExpressionRef ) : SideEffects ;
2325
2350
export function hasSideEffects ( expr : ExpressionRef ) : boolean ;
2326
2351
export function readString ( ptr : number ) : string | null ;
2327
2352
/** Result structure of {@link Module#toBinary}. */
0 commit comments