@@ -238,7 +238,7 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
238238 Duplicate_decorator = 213 ,
239239 Type_0_is_illegal_in_this_context = 214 ,
240240 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 ,
242242 Function_0_cannot_be_inlined_into_itself = 217 ,
243243 Cannot_access_method_0_without_calling_it_as_it_requires_this_to_be_set = 218 ,
244244 Optional_properties_are_not_supported = 219 ,
@@ -325,6 +325,7 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
325325 _super_can_only_be_referenced_in_a_derived_class = 2335 ,
326326 Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors = 2337 ,
327327 Property_0_does_not_exist_on_type_1 = 2339 ,
328+ Property_0_is_private_and_only_accessible_within_class_1 = 2341 ,
328329 Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_Type_0_has_no_compatible_call_signatures = 2349 ,
329330 This_expression_is_not_constructable = 2351 ,
330331 A_function_whose_declared_type_is_not_void_must_return_a_value = 2355 ,
@@ -340,12 +341,14 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
340341 Duplicate_function_implementation = 2393 ,
341342 Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local = 2395 ,
342343 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 ,
343345 The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly = 2453 ,
344346 Type_0_has_no_property_1 = 2460 ,
345347 The_0_operator_cannot_be_applied_to_type_1 = 2469 ,
346348 In_const_enum_declarations_member_initializer_must_be_constant_expression = 2474 ,
347349 Export_declaration_conflicts_with_exported_declaration_of_0 = 2484 ,
348350 _0_is_referenced_directly_or_indirectly_in_its_own_base_expression = 2506 ,
351+ Cannot_create_an_instance_of_an_abstract_class = 2511 ,
349352 Object_is_possibly_null = 2531 ,
350353 Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property = 2540 ,
351354 The_target_of_an_assignment_must_be_a_variable_or_a_property_access = 2541 ,
@@ -557,6 +560,8 @@ declare module "assemblyscript/src/util/text" {
557560 export function isDecimalDigit ( c : number ) : boolean ;
558561 /** Tests if the specified character code is a valid octal digit. */
559562 export function isOctalDigit ( c : number ) : boolean ;
563+ /** Tests if the specified character code is trivially alphanumeric. */
564+ export function isTrivialAlphanum ( code : number ) : boolean ;
560565 /** Tests if the specified character code is a valid start of an identifier. */
561566 export function isIdentifierStart ( c : number ) : boolean ;
562567 /** Tests if the specified character code is a valid keyword character. */
@@ -2124,6 +2129,11 @@ declare module "assemblyscript/src/module" {
21242129 LoadI32ToI64x2 = 8 ,
21252130 LoadU32ToU64x2 = 9
21262131 }
2132+ export enum ExpressionRunnerFlags {
2133+ Default = 0 ,
2134+ PreserveSideeffects = 1 ,
2135+ TraverseCalls = 2
2136+ }
21272137 export class MemorySegment {
21282138 buffer : Uint8Array ;
21292139 offset : i64 ;
@@ -2163,6 +2173,7 @@ declare module "assemblyscript/src/module" {
21632173 flatten ( stmts : ExpressionRef [ ] , type ?: NativeType ) : ExpressionRef ;
21642174 br ( label : string | null , condition ?: ExpressionRef , value ?: ExpressionRef ) : ExpressionRef ;
21652175 drop ( expression : ExpressionRef ) : ExpressionRef ;
2176+ maybeDropCondition ( condition : ExpressionRef , result : ExpressionRef ) : ExpressionRef ;
21662177 loop ( label : string | null , body : ExpressionRef ) : ExpressionRef ;
21672178 if ( condition : ExpressionRef , ifTrue : ExpressionRef , ifFalse ?: ExpressionRef ) : ExpressionRef ;
21682179 nop ( ) : ExpressionRef ;
@@ -2245,8 +2256,6 @@ declare module "assemblyscript/src/module" {
22452256 runPass ( pass : string , func ?: FunctionRef ) : void ;
22462257 runPasses ( passes : string [ ] , func ?: FunctionRef ) : void ;
22472258 optimize ( optimizeLevel : number , shrinkLevel : number , debugInfo ?: boolean , usesARC ?: boolean ) : void ;
2248- private cachedPrecomputeNames ;
2249- precomputeExpression ( expr : ExpressionRef ) : ExpressionRef ;
22502259 validate ( ) : boolean ;
22512260 interpret ( ) : void ;
22522261 toBinary ( sourceMapUrl : string | null ) : BinaryModule ;
@@ -2257,6 +2266,7 @@ declare module "assemblyscript/src/module" {
22572266 dispose ( ) : void ;
22582267 createRelooper ( ) : number ;
22592268 cloneExpression ( expr : ExpressionRef , noSideEffects ?: boolean , maxDepth ?: number ) : ExpressionRef ;
2269+ runExpression ( expr : ExpressionRef , flags : ExpressionRunnerFlags , maxDepth ?: number , maxLoopIterations ?: number ) : ExpressionRef ;
22602270 addDebugInfoFile ( name : string ) : Index ;
22612271 getDebugInfoFile ( index : Index ) : string | null ;
22622272 setDebugLocation ( func : FunctionRef , expr : ExpressionRef , fileIndex : Index , lineNumber : Index , columnNumber : Index ) : void ;
@@ -4106,7 +4116,7 @@ declare module "assemblyscript/src/compiler" {
41064116 import { Module , MemorySegment , ExpressionRef , NativeType , GlobalRef } from "assemblyscript/src/module" ;
41074117 import { Feature , Target } from "assemblyscript/src/common" ;
41084118 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" ;
41104120 import { Resolver } from "assemblyscript/src/resolver" ;
41114121 import { Range } from "assemblyscript/src/tokenizer" ;
41124122 import { Node , FunctionTypeNode , Statement , Expression } from "assemblyscript/src/ast" ;
@@ -4337,8 +4347,6 @@ declare module "assemblyscript/src/compiler" {
43374347 /** Compiles the value of an inlined constant element. */
43384348 compileInlineConstant ( element : VariableLikeElement , contextualType : Type , constraints : Constraints ) : ExpressionRef ;
43394349 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 ;
43424350 /** Compiles an expression that is about to be returned, taking special care of retaining and setting flow states. */
43434351 private compileReturnedExpression ;
43444352 convertExpression ( expr : ExpressionRef ,
@@ -4519,6 +4527,8 @@ declare module "assemblyscript/src/compiler" {
45194527 checkTypeSupported ( type : Type , reportNode : Node ) : boolean ;
45204528 /** Checks whether a particular function signature is supported. */
45214529 checkSignatureSupported ( signature : Signature , reportNode : FunctionTypeNode ) : boolean ;
4530+ /** Evaluates a boolean condition, determining whether it is TRUE, FALSE or UNKNOWN. */
4531+ evaluateCondition ( expr : ExpressionRef ) : ConditionKind ;
45224532 /** Makes a constant zero of the specified type. */
45234533 makeZero ( type : Type ) : ExpressionRef ;
45244534 /** Makes a constant one of the specified type. */
0 commit comments