@@ -238,7 +238,7 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
238
238
Duplicate_decorator = 213 ,
239
239
Type_0_is_illegal_in_this_context = 214 ,
240
240
Optional_parameter_must_have_an_initializer = 215 ,
241
- Constructor_of_class_0_must_not_require_any_arguments = 216 ,
241
+ Class_0_cannot_declare_a_constructor_when_instantiated_from_an_object_literal = 216 ,
242
242
Function_0_cannot_be_inlined_into_itself = 217 ,
243
243
Cannot_access_method_0_without_calling_it_as_it_requires_this_to_be_set = 218 ,
244
244
Optional_properties_are_not_supported = 219 ,
@@ -325,6 +325,7 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
325
325
_super_can_only_be_referenced_in_a_derived_class = 2335 ,
326
326
Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors = 2337 ,
327
327
Property_0_does_not_exist_on_type_1 = 2339 ,
328
+ Property_0_is_private_and_only_accessible_within_class_1 = 2341 ,
328
329
Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures = 2349 ,
329
330
This_expression_is_not_constructable = 2351 ,
330
331
A_function_whose_declared_type_is_not_void_must_return_a_value = 2355 ,
@@ -340,12 +341,14 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
340
341
Duplicate_function_implementation = 2393 ,
341
342
Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local = 2395 ,
342
343
A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged = 2434 ,
344
+ Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses = 2445 ,
343
345
The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly = 2453 ,
344
346
Type_0_has_no_property_1 = 2460 ,
345
347
The_0_operator_cannot_be_applied_to_type_1 = 2469 ,
346
348
In_const_enum_declarations_member_initializer_must_be_constant_expression = 2474 ,
347
349
Export_declaration_conflicts_with_exported_declaration_of_0 = 2484 ,
348
350
_0_is_referenced_directly_or_indirectly_in_its_own_base_expression = 2506 ,
351
+ Cannot_create_an_instance_of_an_abstract_class = 2511 ,
349
352
Object_is_possibly_null = 2531 ,
350
353
Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property = 2540 ,
351
354
The_target_of_an_assignment_must_be_a_variable_or_a_property_access = 2541 ,
@@ -557,6 +560,8 @@ declare module "assemblyscript/src/util/text" {
557
560
export function isDecimalDigit ( c : number ) : boolean ;
558
561
/** Tests if the specified character code is a valid octal digit. */
559
562
export function isOctalDigit ( c : number ) : boolean ;
563
+ /** Tests if the specified character code is trivially alphanumeric. */
564
+ export function isTrivialAlphanum ( code : number ) : boolean ;
560
565
/** Tests if the specified character code is a valid start of an identifier. */
561
566
export function isIdentifierStart ( c : number ) : boolean ;
562
567
/** Tests if the specified character code is a valid keyword character. */
@@ -2124,6 +2129,11 @@ declare module "assemblyscript/src/module" {
2124
2129
LoadI32ToI64x2 = 8 ,
2125
2130
LoadU32ToU64x2 = 9
2126
2131
}
2132
+ export enum ExpressionRunnerFlags {
2133
+ Default = 0 ,
2134
+ PreserveSideeffects = 1 ,
2135
+ TraverseCalls = 2
2136
+ }
2127
2137
export class MemorySegment {
2128
2138
buffer : Uint8Array ;
2129
2139
offset : i64 ;
@@ -2163,6 +2173,7 @@ declare module "assemblyscript/src/module" {
2163
2173
flatten ( stmts : ExpressionRef [ ] , type ?: NativeType ) : ExpressionRef ;
2164
2174
br ( label : string | null , condition ?: ExpressionRef , value ?: ExpressionRef ) : ExpressionRef ;
2165
2175
drop ( expression : ExpressionRef ) : ExpressionRef ;
2176
+ maybeDropCondition ( condition : ExpressionRef , result : ExpressionRef ) : ExpressionRef ;
2166
2177
loop ( label : string | null , body : ExpressionRef ) : ExpressionRef ;
2167
2178
if ( condition : ExpressionRef , ifTrue : ExpressionRef , ifFalse ?: ExpressionRef ) : ExpressionRef ;
2168
2179
nop ( ) : ExpressionRef ;
@@ -2245,8 +2256,6 @@ declare module "assemblyscript/src/module" {
2245
2256
runPass ( pass : string , func ?: FunctionRef ) : void ;
2246
2257
runPasses ( passes : string [ ] , func ?: FunctionRef ) : void ;
2247
2258
optimize ( optimizeLevel : number , shrinkLevel : number , debugInfo ?: boolean , usesARC ?: boolean ) : void ;
2248
- private cachedPrecomputeNames ;
2249
- precomputeExpression ( expr : ExpressionRef ) : ExpressionRef ;
2250
2259
validate ( ) : boolean ;
2251
2260
interpret ( ) : void ;
2252
2261
toBinary ( sourceMapUrl : string | null ) : BinaryModule ;
@@ -2257,6 +2266,7 @@ declare module "assemblyscript/src/module" {
2257
2266
dispose ( ) : void ;
2258
2267
createRelooper ( ) : number ;
2259
2268
cloneExpression ( expr : ExpressionRef , noSideEffects ?: boolean , maxDepth ?: number ) : ExpressionRef ;
2269
+ runExpression ( expr : ExpressionRef , flags : ExpressionRunnerFlags , maxDepth ?: number , maxLoopIterations ?: number ) : ExpressionRef ;
2260
2270
addDebugInfoFile ( name : string ) : Index ;
2261
2271
getDebugInfoFile ( index : Index ) : string | null ;
2262
2272
setDebugLocation ( func : FunctionRef , expr : ExpressionRef , fileIndex : Index , lineNumber : Index , columnNumber : Index ) : void ;
@@ -4106,7 +4116,7 @@ declare module "assemblyscript/src/compiler" {
4106
4116
import { Module , MemorySegment , ExpressionRef , NativeType , GlobalRef } from "assemblyscript/src/module" ;
4107
4117
import { Feature , Target } from "assemblyscript/src/common" ;
4108
4118
import { Program , ClassPrototype , Class , Element , Enum , Field , Function , Global , Property , VariableLikeElement , File } from "assemblyscript/src/program" ;
4109
- import { Flow } from "assemblyscript/src/flow" ;
4119
+ import { Flow , ConditionKind } from "assemblyscript/src/flow" ;
4110
4120
import { Resolver } from "assemblyscript/src/resolver" ;
4111
4121
import { Range } from "assemblyscript/src/tokenizer" ;
4112
4122
import { Node , FunctionTypeNode , Statement , Expression } from "assemblyscript/src/ast" ;
@@ -4337,8 +4347,6 @@ declare module "assemblyscript/src/compiler" {
4337
4347
/** Compiles the value of an inlined constant element. */
4338
4348
compileInlineConstant ( element : VariableLikeElement , contextualType : Type , constraints : Constraints ) : ExpressionRef ;
4339
4349
compileExpression ( expression : Expression , contextualType : Type , constraints ?: Constraints ) : ExpressionRef ;
4340
- /** Compiles and precomputes an expression, possibly yielding a costant value. */
4341
- precomputeExpression ( expression : Expression , contextualType : Type , constraints ?: Constraints ) : ExpressionRef ;
4342
4350
/** Compiles an expression that is about to be returned, taking special care of retaining and setting flow states. */
4343
4351
private compileReturnedExpression ;
4344
4352
convertExpression ( expr : ExpressionRef ,
@@ -4519,6 +4527,8 @@ declare module "assemblyscript/src/compiler" {
4519
4527
checkTypeSupported ( type : Type , reportNode : Node ) : boolean ;
4520
4528
/** Checks whether a particular function signature is supported. */
4521
4529
checkSignatureSupported ( signature : Signature , reportNode : FunctionTypeNode ) : boolean ;
4530
+ /** Evaluates a boolean condition, determining whether it is TRUE, FALSE or UNKNOWN. */
4531
+ evaluateCondition ( expr : ExpressionRef ) : ConditionKind ;
4522
4532
/** Makes a constant zero of the specified type. */
4523
4533
makeZero ( type : Type ) : ExpressionRef ;
4524
4534
/** Makes a constant one of the specified type. */
0 commit comments