Goose  Diff

Differences From Artifact [da45e798f2]:

  • File bs/builtins/api/compiler.cpp — part of check-in [533d2ce579] at 2019-08-27 20:27:55 on branch trunk — Tuples containing only types or other tuples of types are now considered types. (user: achavasse size: 7357)

To Artifact [276d46fbde]:

  • File bs/builtins/api/compiler.cpp — part of check-in [8abb611e48] at 2019-09-16 21:38:32 on branch trunk —
    • func: created an identity for the verification expressions.
    • func: created bindings for the function parameters inside of the verification expressions identity.
    (user: achavasse size: 7359)

128
129
130
131
132
133
134
135
136
137
138
139
140
141

142
143
144
145
146
147
148
                if( CheckParamListKind( params ) != ParamListKind::Regular )
                {
                    DiagnosticsManager::GetInstance().emitErrorMessage( params.locationId(),
                        "#CompileFileToFunction: template parameter lists are not supported.", 0 );
                    return PoisonValue();
                }

                auto ftype = BuildFuncType( sema::DomainAny(), rt, params );

                // TODO at some point we'll want to pass the base identity to use as a param but
                // let's wait and see how the module and namespace stuff pans out first

                auto identity = sema::InjectDomainIntoIdentity( builtins::RootIdentity(), DomainRunTime() );
                sema::Context c( pEnv.lock(), identity, ftype.returnType() );


                auto funcIdentity = AppendToVectorTerm( sema::InjectDomainIntoIdentity( identity, DomainRunTime() ),
                    TERM( StringId( pEnv.lock()->NewUniqueId() ) ) );

                c.env()->addVisibilityRule(
                    InjectDomainIntoIdentity( identity, ANYTERM( _ ) ),
                    InjectDomainIntoIdentity( funcIdentity, ANYTERM( _ ) ) );







<
<


<

|
>







128
129
130
131
132
133
134


135
136

137
138
139
140
141
142
143
144
145
146
                if( CheckParamListKind( params ) != ParamListKind::Regular )
                {
                    DiagnosticsManager::GetInstance().emitErrorMessage( params.locationId(),
                        "#CompileFileToFunction: template parameter lists are not supported.", 0 );
                    return PoisonValue();
                }



                // TODO at some point we'll want to pass the base identity to use as a param but
                // let's wait and see how the module and namespace stuff pans out first

                auto identity = sema::InjectDomainIntoIdentity( builtins::RootIdentity(), DomainRunTime() );
                sema::Context c( pEnv.lock(), identity, ValueToIRExpr( rt ) );
                auto ftype = BuildFuncType( c, sema::DomainAny(), rt, params );

                auto funcIdentity = AppendToVectorTerm( sema::InjectDomainIntoIdentity( identity, DomainRunTime() ),
                    TERM( StringId( pEnv.lock()->NewUniqueId() ) ) );

                c.env()->addVisibilityRule(
                    InjectDomainIntoIdentity( identity, ANYTERM( _ ) ),
                    InjectDomainIntoIdentity( funcIdentity, ANYTERM( _ ) ) );