Goose  Diff

Differences From Artifact [2f9dd7b669]:

  • File bs/builtins/operators/comma.cpp — part of check-in [3eebbcff0c] at 2021-01-03 18:34:23 on branch trunk — Fixed a bug with addresses computed during compilation time execution. Mutating values through references passed as parameters now works, at compilation time at least. (user: achavasse size: 3028)

To Artifact [5ddee2f849]:

  • File bs/builtins/operators/comma.cpp — part of check-in [373a6ebd57] at 2022-09-02 21:42:42 on branch trunk —
    • Implemented a test for variadic functions
    • Fixed a million issues and missing things preventing the above from working
    • Implemented equality operators for types
    (user: zlodo size: 3044)

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
                    return PrependToTuple( lhs, rhs );
                } ),

                // Overload: anything, anything
                ForType< Value >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( AppendToTuple( EmptyTuple(), lhs ), rhs );
                } ),

                // We want to be able to put references in tuples without them getting
                // automatically dereferenced, so we have specific overloads that treat
                // them explicitely.
                ForType< RefOfAnyType >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( AppendToTuple( EmptyTuple(), lhs ), rhs );
                } ),

                ForTypes< Value, RefOfAnyType >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( AppendToTuple( EmptyTuple(), lhs ), rhs );
                } ),

                ForTypes< RefOfAnyType, Value >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( AppendToTuple( EmptyTuple(), lhs ), rhs );
                } ),

                ForTypes< CustomPattern< Value, TupleOpenPattern >, RefOfAnyType >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( lhs, rhs );
                } ),







|








|





|





|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
                    return PrependToTuple( lhs, rhs );
                } ),

                // Overload: anything, anything
                ForType< Value >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( AppendToTuple( EmptyOpenTuple(), lhs ), rhs );
                } ),

                // We want to be able to put references in tuples without them getting
                // automatically dereferenced, so we have specific overloads that treat
                // them explicitely.
                ForType< RefOfAnyType >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( AppendToTuple( EmptyOpenTuple(), lhs ), rhs );
                } ),

                ForTypes< Value, RefOfAnyType >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( AppendToTuple( EmptyOpenTuple(), lhs ), rhs );
                } ),

                ForTypes< RefOfAnyType, Value >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( AppendToTuple( EmptyOpenTuple(), lhs ), rhs );
                } ),

                ForTypes< CustomPattern< Value, TupleOpenPattern >, RefOfAnyType >(
                []( auto&& c, auto&& lhs, auto&& rhs ) -> Value
                {
                    return AppendToTuple( lhs, rhs );
                } ),