@@ -325,6 +325,7 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
325325 The_0_operator_cannot_be_applied_to_type_1 = 2469 ,
326326 In_const_enum_declarations_member_initializer_must_be_constant_expression = 2474 ,
327327 Export_declaration_conflicts_with_exported_declaration_of_0 = 2484 ,
328+ _0_is_referenced_directly_or_indirectly_in_its_own_base_expression = 2506 ,
328329 Object_is_possibly_null = 2531 ,
329330 Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property = 2540 ,
330331 The_target_of_an_assignment_must_be_a_variable_or_a_property_access = 2541 ,
@@ -2612,26 +2613,22 @@ declare module "assemblyscript/src/flow" {
26122613 WRITTENTO = 32 ,
26132614 /** Local is retained. */
26142615 RETAINED = 64 ,
2615- /** Local is returned. */
2616- RETURNED = 128 ,
26172616 /** Local is conditionally read from. */
2618- CONDITIONALLY_READFROM = 256 ,
2617+ CONDITIONALLY_READFROM = 128 ,
26192618 /** Local is conditionally written to. */
2620- CONDITIONALLY_WRITTENTO = 512 ,
2619+ CONDITIONALLY_WRITTENTO = 256 ,
26212620 /** Local must be conditionally retained. */
2622- CONDITIONALLY_RETAINED = 1024 ,
2621+ CONDITIONALLY_RETAINED = 512 ,
26232622 /** Local is conditionally returned. */
2624- CONDITIONALLY_RETURNED = 2048 ,
2623+ CONDITIONALLY_RETURNED = 1024 ,
26252624 /** Any categorical flag. */
2626- ANY_CATEGORICAL = 255 ,
2625+ ANY_CATEGORICAL = 127 ,
26272626 /** Any conditional flag. */
2628- ANY_CONDITIONAL = 3904 ,
2627+ ANY_CONDITIONAL = 1984 ,
26292628 /** Any written to flag. */
2630- ANY_WRITTENTO = 544 ,
2629+ ANY_WRITTENTO = 288 ,
26312630 /** Any retained flag. */
2632- ANY_RETAINED = 1088 ,
2633- /** Any returned flag. */
2634- ANY_RETURNED = 2176
2631+ ANY_RETAINED = 576
26352632 }
26362633 export namespace LocalFlags {
26372634 function join ( left : LocalFlags , right : LocalFlags ) : LocalFlags ;
@@ -4204,6 +4201,14 @@ declare module "assemblyscript/src/compiler" {
42044201 compileExpressionStatement ( statement : ExpressionStatement ) : ExpressionRef ;
42054202 compileForStatement ( statement : ForStatement ) : ExpressionRef ;
42064203 compileIfStatement ( statement : IfStatement ) : ExpressionRef ;
4204+ /** Compiles an expression that is about to be returned, taking special care of retaining and setting flow states. */
4205+ compileReturnedExpression (
4206+ /** Expression to compile. */
4207+ expression : Expression ,
4208+ /** Return type of the function. */
4209+ returnType : Type ,
4210+ /** Constraints indicating contextual conditions. */
4211+ constraints ?: Constraints ) : ExpressionRef ;
42074212 compileReturnStatement ( statement : ReturnStatement , isLastInBody : boolean ) : ExpressionRef ;
42084213 compileSwitchStatement ( statement : SwitchStatement ) : ExpressionRef ;
42094214 compileThrowStatement ( statement : ThrowStatement ) : ExpressionRef ;
0 commit comments