Goose  Diff

Differences From Artifact [2c25f63176]:

  • File bs/builtins/types/runtime/basic.cpp — part of check-in [bd7954bf0c] at 2019-08-03 17:16:14 on branch trunk —
    • lexer: handle hex and binary integer literals.
    • builtins: implemented the logic and the compile-time bitwise xor operator.
    (user: achavasse size: 3732)

To Artifact [007b74dba9]:

  • File bs/builtins/types/runtime/basic.cpp — part of check-in [1886f5f367] at 2019-08-03 19:29:43 on branch trunk — Implemented the runtime bitwise xor operator. (user: achavasse size: 3724)

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
        RegisterBuiltinFunc< Eager< Value > ( uint64_t ) >( e, "RTSInt"_sid,
            []( uint64_t numBits )
            {
                return ToValue( RTInteger( numBits, true ) );
            } );
    }

    const Term& RTInteger::SizeIntegerPattern::GetPattern()
    {
        static auto pattern = ValueToIRExpr( Value( TypeType(), TVEC( TSID( rt_type ),
            MkHole( "_"_sid ),
            TSID( rt_integer ), MkHole( "size"_sid ), MkHole( "_"_sid ) ) ) );

        return pattern;
    }

    const Term& RTInteger::SizeAndSignednessIntegerPattern::GetPattern()
    {
        static auto pattern = ValueToIRExpr( Value( TypeType(), TVEC( TSID( rt_type ),
            MkHole( "_"_sid ),
            TSID( rt_integer ), MkHole( "size"_sid ), MkHole( "signedness"_sid ) ) ) );

        return pattern;
    }







|








|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
        RegisterBuiltinFunc< Eager< Value > ( uint64_t ) >( e, "RTSInt"_sid,
            []( uint64_t numBits )
            {
                return ToValue( RTInteger( numBits, true ) );
            } );
    }

    const Term& RTInteger::SizeIntegerPat::GetPattern()
    {
        static auto pattern = ValueToIRExpr( Value( TypeType(), TVEC( TSID( rt_type ),
            MkHole( "_"_sid ),
            TSID( rt_integer ), MkHole( "size"_sid ), MkHole( "_"_sid ) ) ) );

        return pattern;
    }

    const Term& RTInteger::SizeAndSignednessIntegerPat::GetPattern()
    {
        static auto pattern = ValueToIRExpr( Value( TypeType(), TVEC( TSID( rt_type ),
            MkHole( "_"_sid ),
            TSID( rt_integer ), MkHole( "size"_sid ), MkHole( "signedness"_sid ) ) ) );

        return pattern;
    }