Goose  Diff

Differences From Artifact [f9afec5ee1]:

  • File bs/builtins/types/reference/typecheck.cpp — part of check-in [0d5427d49b] at 2022-05-23 08:44:00 on branch cir-stack-language —
    • CIR instructions are now stored in lists
    • Execute: handle the stack
    • Converted some instructions to use the stack
    (user: zlodo size: 10046)

To Artifact [601ebe8be9]:

  • File bs/builtins/types/reference/typecheck.cpp — part of check-in [7992dbe59f] at 2022-05-25 17:28:04 on branch cir-stack-language —
    • Split function invocation code into several specialized versions for each function kind
    • Almost fully completed the migration of CIR to a stack language
    • Compilation-time execution works again
    (user: zlodo size: 10046)

60
61
62
63
64
65
66
67

68
69
70
71
72
73
74
60
61
62
63
64
65
66

67
68
69
70
71
72
73
74







-
+








                auto cfg = GetCFG( tcc.context() );
                if( !cfg )
                    return nullopt;

                // TODO create an ext point for this
                auto tempIndex = cfg->getNewTemporaryIndex();
                return ValueToEIR( BuildComputedValue( ValueToEIR( ToValue( rt ) ), TempAddr( tempIndex, rhsVal ) )
                return ValueToEIR( BuildComputedValue( ValueToEIR( ToValue( rt ) ), rhsVal, TempAddr( tempIndex ) )
                    .setLocationId( rhsVal.locationId() ) );
            } );

            // Override the weight because we don't want
            // this solution to count more than directly using
            // the value without wrapping it into a tempref
            SetWeight( wrapped, GetWeight( rhs ) - 1 );