Goose  Diff

Differences From Artifact [3a8d0eab02]:

  • File bs/g0api/compiler.cpp — part of check-in [b846dfa2fb] at 2021-09-20 23:23:02 on branch trunk — Integrated the Tracy profiling client and added some profiling instrumentation (user: achavasse size: 8700)

To Artifact [c5f7d13631]:

  • File bs/g0api/compiler.cpp — part of check-in [39c8a653da] at 2021-09-28 17:59:46 on branch trunk — Fix functions and template functions not getting compiled with visibility over their original enclosing scope, but over the current scope at the point of invocation instead (user: achavasse size: 8710)

195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
                auto funcIdentity = AppendToVectorTerm( identity,
                    TERM( StringId( Env::NewUniqueId() ) ) );
                c.env()->addVisibilityRule( identity, funcIdentity );

                auto locVarsIdentity = AppendToVectorTerm( funcIdentity, TSID( locvars ) );
                c.env()->addVisibilityRule( funcIdentity, locVarsIdentity );

                auto func = BuildFunc( localC, *ftype, funcIdentity, params, nullptr, c );
                const auto& pFuncCIR = func.cir();

                auto cfg = Compiler::LoadAndParseFile( pEnv.lock(), filename, locVarsIdentity,
                    ftype->returnType(), defReturnValue );

                if( !cfg )
                    return PoisonValue();







|







195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
                auto funcIdentity = AppendToVectorTerm( identity,
                    TERM( StringId( Env::NewUniqueId() ) ) );
                c.env()->addVisibilityRule( identity, funcIdentity );

                auto locVarsIdentity = AppendToVectorTerm( funcIdentity, TSID( locvars ) );
                c.env()->addVisibilityRule( funcIdentity, locVarsIdentity );

                auto func = BuildFunc( localC, *ftype, identity, funcIdentity, params, nullptr, c );
                const auto& pFuncCIR = func.cir();

                auto cfg = Compiler::LoadAndParseFile( pEnv.lock(), filename, locVarsIdentity,
                    ftype->returnType(), defReturnValue );

                if( !cfg )
                    return PoisonValue();