@@ -325,6 +325,7 @@ declare module "assemblyscript/src/diagnosticMessages.generated" {
325
325
The_0_operator_cannot_be_applied_to_type_1 = 2469 ,
326
326
In_const_enum_declarations_member_initializer_must_be_constant_expression = 2474 ,
327
327
Export_declaration_conflicts_with_exported_declaration_of_0 = 2484 ,
328
+ _0_is_referenced_directly_or_indirectly_in_its_own_base_expression = 2506 ,
328
329
Object_is_possibly_null = 2531 ,
329
330
Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property = 2540 ,
330
331
The_target_of_an_assignment_must_be_a_variable_or_a_property_access = 2541 ,
@@ -2612,26 +2613,22 @@ declare module "assemblyscript/src/flow" {
2612
2613
WRITTENTO = 32 ,
2613
2614
/** Local is retained. */
2614
2615
RETAINED = 64 ,
2615
- /** Local is returned. */
2616
- RETURNED = 128 ,
2617
2616
/** Local is conditionally read from. */
2618
- CONDITIONALLY_READFROM = 256 ,
2617
+ CONDITIONALLY_READFROM = 128 ,
2619
2618
/** Local is conditionally written to. */
2620
- CONDITIONALLY_WRITTENTO = 512 ,
2619
+ CONDITIONALLY_WRITTENTO = 256 ,
2621
2620
/** Local must be conditionally retained. */
2622
- CONDITIONALLY_RETAINED = 1024 ,
2621
+ CONDITIONALLY_RETAINED = 512 ,
2623
2622
/** Local is conditionally returned. */
2624
- CONDITIONALLY_RETURNED = 2048 ,
2623
+ CONDITIONALLY_RETURNED = 1024 ,
2625
2624
/** Any categorical flag. */
2626
- ANY_CATEGORICAL = 255 ,
2625
+ ANY_CATEGORICAL = 127 ,
2627
2626
/** Any conditional flag. */
2628
- ANY_CONDITIONAL = 3904 ,
2627
+ ANY_CONDITIONAL = 1984 ,
2629
2628
/** Any written to flag. */
2630
- ANY_WRITTENTO = 544 ,
2629
+ ANY_WRITTENTO = 288 ,
2631
2630
/** Any retained flag. */
2632
- ANY_RETAINED = 1088 ,
2633
- /** Any returned flag. */
2634
- ANY_RETURNED = 2176
2631
+ ANY_RETAINED = 576
2635
2632
}
2636
2633
export namespace LocalFlags {
2637
2634
function join ( left : LocalFlags , right : LocalFlags ) : LocalFlags ;
@@ -4204,6 +4201,14 @@ declare module "assemblyscript/src/compiler" {
4204
4201
compileExpressionStatement ( statement : ExpressionStatement ) : ExpressionRef ;
4205
4202
compileForStatement ( statement : ForStatement ) : ExpressionRef ;
4206
4203
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 ;
4207
4212
compileReturnStatement ( statement : ReturnStatement , isLastInBody : boolean ) : ExpressionRef ;
4208
4213
compileSwitchStatement ( statement : SwitchStatement ) : ExpressionRef ;
4209
4214
compileThrowStatement ( statement : ThrowStatement ) : ExpressionRef ;
0 commit comments