Complete transition to fn. Introduce global/threadlocal

This commit is contained in:
Christoffer Lerno
2021-11-16 17:19:12 +01:00
committed by Christoffer Lerno
parent e2621617f1
commit b52b42d4da
331 changed files with 1279 additions and 1261 deletions

View File

@@ -2,14 +2,14 @@
import libc;
func void testf()
fn void testf()
{
float[<4>] y = { 0, 2, 3, 0 };
int[<4>] w = !y;
libc::printf("Notf %d %d %d %d\n", w[0], w[1], w[2], w[3]);
}
func void testi()
fn void testi()
{
int[<4>] y = { 1, 2, 3, 4 };
int[<4>] z = { 2, 3, 13, -100 };
@@ -30,7 +30,7 @@ func void testi()
libc::printf("Not %d %d %d %d\n", w[0], w[1], w[2], w[3]);
}
func void main()
fn void main()
{
testf();
testi();

View File

@@ -1,7 +1,7 @@
// #target: x64-darwin
import libc;
func void testf()
fn void testf()
{
float[<4>] y = { 1, 2, 3, 4 };
float[<4>] z = { 2, 2, 2, -100 };
@@ -15,7 +15,7 @@ func void testf()
libc::printf("Dec %f %f %f %f\n", y[0], y[1], y[2], y[3]);
}
func void testi()
fn void testi()
{
int[<4>] y = { 1, 2, 3, 4 };
int[<4>] z = { 2, 2, 2, -100 };
@@ -30,7 +30,7 @@ func void testi()
libc::printf("Original %d %d %d %d\n", w[0], w[1], w[2], w[3]);
}
func void main()
fn void main()
{
testf();
testi();

View File

@@ -1,7 +1,7 @@
// #target: x64-darwin
int[<4>] baz = { 1, 4, 5, 7 };
global int[<4>] baz = { 1, 4, 5, 7 };
func void main()
fn void main()
{
int[<4>] foo = { 1, 2, 3, 4 };
int z = foo[0];

View File

@@ -1,7 +1,7 @@
// #target: x64-darwin
import libc;
func void testf()
fn void testf()
{
float[<4>] y = { 1, 2, 3, 4 };
float[<4>] z = { 2, 2, 2, -100 };
@@ -17,12 +17,12 @@ func void testf()
libc::printf("%d %d %d %d\n", ww[0], ww[1], ww[2], ww[3]);
}
func void testb()
fn void testb()
{
bool[<4>] d = { true, false, true, true };
}
func void testi()
fn void testi()
{
int[<4>] y = { 1, 2, 3, 4 };
int[<4>] z = { 2, 2, 2, -100 };
@@ -45,7 +45,7 @@ func void testi()
libc::printf("%d %d %d %d\n", w[0], w[1], w[2], w[3]);
}
func void main()
fn void main()
{
testf();
testi();