-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cpp] debug/release is now vaguely respected. release does not enable…
… any optimisations, but it does prevent debug info from being added. note that debug info is basically 0 right now anyway.
- Loading branch information
Showing
6 changed files
with
16 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,120 +1,19 @@ | ||
123; | ||
12345; | ||
|
||
hio : i64 := 64; | ||
|
||
nesteddata :: struct | ||
{ | ||
flak : i64; | ||
} | ||
|
||
mydata :: struct | ||
{ | ||
member : i64 := 5; | ||
member2 : i64 := 69; | ||
nested : nesteddata; | ||
} | ||
//xyz : mydata; | ||
//xyz.member; | ||
|
||
get_data :: () -> mydata | ||
{ | ||
ret : mydata; | ||
(ret.nested.flak) = 9; | ||
return ret; | ||
} | ||
//class :: typedef := mydata; | ||
|
||
putchar :: (ch : i8) -> u0 := extern; | ||
dub :: (val : i64) -> i64 | ||
print_digit :: (digit : i64) -> u0 | ||
{ | ||
vvptr : i64&& const; | ||
deref vvptr = (55@u64& weak); | ||
vv : f64 weak := 5; | ||
vv = 50; | ||
|
||
ptr : i64& := __builtin_malloc(123@u64); | ||
longptr : i64& := (ptr); | ||
defer __builtin_free(ptr); | ||
|
||
is_cringe : bool := (true == false); | ||
val = deref ref val; | ||
val = val - val; | ||
v : i64&; | ||
val = ((val * val) * (val * deref v)); | ||
deref v = 862; | ||
-deref v; | ||
your_mum : i64 := 0; | ||
// return val * 2 | ||
|
||
myint : i64 := 0; | ||
for myint = 0, myint == 5, myint = myint + 1 | ||
{ | ||
putchar(myint@i8); | ||
} | ||
return (val * 2); | ||
} | ||
|
||
complicated :: (par1 : i64, par : i64, par3 : i64) -> i64 | ||
{ | ||
putchar(-par@i8); | ||
return 0; | ||
} | ||
|
||
poggers : i64 := 5; | ||
morb :: (par0 : i64) -> f64 | ||
{ | ||
poggers1 : i64; | ||
poggers2 : i64; | ||
poggers3 : i64; | ||
//morb2 :: (par0 : i64) -> u0 := extern; | ||
mydata123 : mydata; | ||
complicated(poggers, dub(5), mydata123.member2); | ||
complicated(--complicated(1, 2, 3), dub(5), 690); | ||
|
||
phicond : i64 := 5; | ||
phi1 : i64 := 0; | ||
if phicond == 5 | ||
{ | ||
phi1 = 56; | ||
return 5.0; | ||
} | ||
putchar(phi1@i8); | ||
|
||
if poggers1 == 59 | ||
{ | ||
e : i64 := 5; | ||
} | ||
else if poggers2 == 12 | ||
{ | ||
// ur cringe m8. | ||
d : i64 := 5; | ||
if par0 == 5 | ||
{ | ||
|
||
} | ||
else | ||
{ | ||
if poggers3 == 0 | ||
{ | ||
|
||
} | ||
} | ||
} | ||
|
||
retval : f64; | ||
return retval; | ||
//return morb(5 * complicated(dub(5))); | ||
putchar((48 + digit)@i8); | ||
} | ||
|
||
main :: () -> i64 | ||
{ | ||
putchar(48@i8); | ||
print_digit(1); | ||
print_digit(2); | ||
print_digit(3); | ||
return 0; | ||
} | ||
|
||
== default : build == | ||
{ | ||
set_build_type(release); | ||
set_build_type(debug); | ||
set_linkage_type(executable); | ||
} |