Goose  Diff

Differences From Artifact [0f9afb2520]:

  • File bs/parse/rule-helpers.cpp — part of check-in [cde0c6d0e3] at 2019-06-19 19:49:50 on branch trunk —
    • parser: don't hardcode the builtins identity prefix in the rule helpers anymore.
    • builtins: move the common identity prefix used by all builtins into a separate function, to be able to easily change it.
    • builtins: prepend the CompileTime domain specifier to the root builtin identity.
    • sema: don't store the domain separately, extract it from the identity when needed instead.
    (user: achavasse size: 1043)

To Artifact [efbd404021]:

  • File bs/parse/rule-helpers.cpp — part of check-in [429f55ae3c] at 2019-07-09 22:46:58 on branch trunk — codegen: added builtin functions to create a module and to dump it as llvm assembly text. (user: achavasse size: 1055)

13
14
15
16
17
18
19
20

21
22
23

24
25
26
27
28
29
30
13
14
15
16
17
18
19

20
21
22

23
24
25
26
27
28
29
30







-
+


-
+








    Value Bridge< parse::Rule >::ToValue( parse::Rule&& r )
    {
        ptr< void > prule = make_shared< parse::Rule >( move( r ) );
        return Value( Type(), TERM( move( prule ) ) );
    }

    ptr< parse::Rule > Bridge< parse::Rule >::FromValue( const Value& v )
    optional< ptr< parse::Rule > > Bridge< parse::Rule >::FromValue( const Value& v )
    {
        if( v.type() != Type() )
            return nullptr;
            return nullopt;

        const auto& content = v.val().content();
        const auto& p = get< ptr< void > >( content );
        return static_pointer_cast< parse::Rule >( p );
    }
}