mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Added CT_SWITCH parsing in top level. Nil changed to null. Parsing more in line with grammar. Parse type as expressions. Zero init by default for locals. Corrected bool/fp conversion. Add memcpy pass to fix issue with value load/stores.
This commit is contained in:
committed by
Christoffer Lerno
parent
fb937156fe
commit
77ccfc1f7c
@@ -43,7 +43,7 @@ func void tester()
|
||||
p.bb.b = 2;
|
||||
p.b = 3;
|
||||
p.c = 4;
|
||||
p.p = nil;
|
||||
p.p = null;
|
||||
p.d = 5;
|
||||
p.e = 6;
|
||||
p.uu.d = 7;
|
||||
|
||||
@@ -58,7 +58,7 @@ func void test_nonstatic_stuct_func1()
|
||||
func void test_nonstatic_stuct_func2()
|
||||
{
|
||||
int a = Foo.func2.sizeof;
|
||||
int b = Foo.func2(nil, 2);
|
||||
int b = Foo.func2(null, 2);
|
||||
}
|
||||
|
||||
*/
|
||||
@@ -18,10 +18,7 @@ func void test1()
|
||||
@Point = linkonce_odr constant i8 1
|
||||
|
||||
entry:
|
||||
%p = alloca %test.Point
|
||||
%0 = getelementptr inbounds %test.Point, %test.Point* %p, i32 0, i32 0
|
||||
store i32 5, i32* %0
|
||||
%1 = getelementptr inbounds %test.Point, %test.Point* %p, i32 0, i32 1
|
||||
store i32 6, i32* %1
|
||||
%2 = load %test.Point, %test.Point* %p
|
||||
%p = alloca %test.Point
|
||||
%0 = load %test.Point, %test.Point* @0
|
||||
store %test.Point %0, %test.Point* %p
|
||||
|
||||
|
||||
Reference in New Issue
Block a user