export things that be exported
This commit is contained in:
parent
e6b0fb7cdf
commit
1904b58458
2 changed files with 22 additions and 19 deletions
1
TODO
Normal file
1
TODO
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
- Add easing module
|
||||||
40
macros.jai
40
macros.jai
|
|
@ -124,10 +124,7 @@ c_call :: (call: Code, ctx: #Context) #expand {
|
||||||
push_context ctx { #insert,scope(call) call; }
|
push_context ctx { #insert,scope(call) call; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#scope_file;
|
// @note(judah): for_expansions have to be exported
|
||||||
|
|
||||||
Default_Name :: "block";
|
|
||||||
Named_Block :: struct(NAME: string) {}
|
|
||||||
|
|
||||||
for_expansion :: (v: *Named_Block, code: Code, _: For_Flags) #expand {
|
for_expansion :: (v: *Named_Block, code: Code, _: For_Flags) #expand {
|
||||||
#insert #run basic.tprint(#string END
|
#insert #run basic.tprint(#string END
|
||||||
|
|
@ -142,21 +139,6 @@ for_expansion :: (v: *Named_Block, code: Code, _: For_Flags) #expand {
|
||||||
ifx v.NAME.count != 0 v.NAME else Default_Name);
|
ifx v.NAME.count != 0 v.NAME else Default_Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Unrolled_Loop :: struct(N: int, T: Type = void) {
|
|
||||||
// Only store arrays when we absolutely have to.
|
|
||||||
#if T != void {
|
|
||||||
// @todo(judah): because this will only be created via 'unroll',
|
|
||||||
// should these be pointers to the underlying arrays so we don't
|
|
||||||
// pay for a copy?
|
|
||||||
#if N == -1 {
|
|
||||||
array: []T = ---;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
array: [N]T = ---;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for_expansion :: (loop: *Unrolled_Loop, body: Code, flags: For_Flags, loc := #caller_location) #expand {
|
for_expansion :: (loop: *Unrolled_Loop, body: Code, flags: For_Flags, loc := #caller_location) #expand {
|
||||||
#assert flags & .REVERSE == 0 "reverse iteration not supported with loop unrolling (for now)";
|
#assert flags & .REVERSE == 0 "reverse iteration not supported with loop unrolling (for now)";
|
||||||
#assert flags & .POINTER == 0 "pointer iteration not supported with loop unrolling (for now)";
|
#assert flags & .POINTER == 0 "pointer iteration not supported with loop unrolling (for now)";
|
||||||
|
|
@ -240,6 +222,26 @@ for_expansion :: (loop: *Unrolled_Loop, body: Code, flags: For_Flags, loc := #ca
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#scope_file;
|
||||||
|
|
||||||
|
Default_Name :: "block";
|
||||||
|
Named_Block :: struct(NAME: string) {}
|
||||||
|
|
||||||
|
Unrolled_Loop :: struct(N: int, T: Type = void) {
|
||||||
|
// Only store arrays when we absolutely have to.
|
||||||
|
#if T != void {
|
||||||
|
// @todo(judah): because this will only be created via 'unroll',
|
||||||
|
// should these be pointers to the underlying arrays so we don't
|
||||||
|
// pay for a copy?
|
||||||
|
#if N == -1 {
|
||||||
|
array: []T = ---;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
array: [N]T = ---;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pp :: #import "Program_Print";
|
pp :: #import "Program_Print";
|
||||||
compiler :: #import "Compiler";
|
compiler :: #import "Compiler";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue