Goose  Diff

Differences From Artifact [7cf3958356]:

  • File bs/builtins/types/localvar/localvar.cpp — part of check-in [32f94cd2e1] at 2023-08-02 21:46:53 on branch trunk — Implemented forall statement (user: zlodo size: 9645)

To Artifact [e858b0d5cc]:

  • File bs/builtins/types/localvar/localvar.cpp — part of check-in [308bd3ed4d] at 2023-12-09 19:44:26 on branch trunk — Assigning something to a Decl or a TNamedDecl no longer directly declares a variable but creates an intermediate DeclWithInit or TNamedDeclWithInit, which declare variables when dropped. (user: zlodo size: 9651)

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
        c.env()->storeValue( identity, ANYTERM( _ ),
            ValueToEIR( locVar ) );

        DeclareValue( c, locVar, lv.index() );
        return locVar;
    }

    Value DeclareLocalVarWithTypeInference( Context& c, const Term& typeTExpr, StringId name, const Value& initVal, LocationId locId )
    {
        auto cfg = GetCFG( c );
        if( !cfg )
            return PoisonValue();

        auto bb = cfg->currentBB();
        if( !bb )







|







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
        c.env()->storeValue( identity, ANYTERM( _ ),
            ValueToEIR( locVar ) );

        DeclareValue( c, locVar, lv.index() );
        return locVar;
    }

    Value DeclareLocalVarWithTypeInference( const Context& c, const Term& typeTExpr, StringId name, const Value& initVal, LocationId locId )
    {
        auto cfg = GetCFG( c );
        if( !cfg )
            return PoisonValue();

        auto bb = cfg->currentBB();
        if( !bb )