Goose  Diff

Differences From Artifact [914fb68bbc]:

  • File bs/compiler.cpp — part of check-in [16a9039350] at 2019-07-29 14:44:55 on branch trunk — Embedded lld and added builtin functions to invoke it. The shitty hello world sample now performs all the steps to produce a functional binary. (user: achavasse size: 1975)

To Artifact [b301f2e8a5]:

  • File bs/compiler.cpp — part of check-in [3c074f1b7d] at 2019-07-30 22:05:49 on branch trunk —
    • Builtin functions are now explicitely marked if they need to be evaluated eagerly.
    • Using errors out if the expression doesn't evaluate to a constant.
    (user: achavasse size: 1994)

22
23
24
25
26
27
28
29

30
31
32
33
34
35
36
22
23
24
25
26
27
28

29
30
31
32
33
34
35
36







-
+







        if( i > 1 )
            cmdArgs = cmdArgs + ' ';
        cmdArgs = cmdArgs + argv[i];
    }

    builtins::SetupBuiltins( *m_pEnv );

    builtins::RegisterBuiltinFunc< string () >( *m_pEnv, "Args"_sid,
    builtins::RegisterBuiltinFunc< builtins::Eager< string > () >( *m_pEnv, "Args"_sid,
        [cmdArgs]()
        {
            return cmdArgs;
        } );

    builtins::RegisterBuiltinFunc< void ( string ) >( *m_pEnv, "Print"_sid,
        []( const string& str )