make precompiled.bqn work
This commit is contained in:
parent
1816b6cd5d
commit
5c59f0de6f
@ -14,16 +14,9 @@ tests ← •FLines path∾"/test/cases/prim.bqn"
|
||||
'%'⊸∊◶{𝕤
|
||||
•Out 𝕩
|
||||
"src/gen/interp" •FChars ⟨1,path,𝕩⟩ •Import "cc.bqn"
|
||||
(×⊑)◶@‿{𝕤⋄•Out "############ Failed to compile! ############" ⋄ •Out¨1↓𝕩}{env⇐<"PATH="∾envP}•SH"./debugBuild"‿"-DPRECOMP"
|
||||
(×⊑)◶@‿{𝕤⋄•Out "############ Failed to compile! ############" ⋄ •Out¨1↓𝕩}{env⇐<"PATH="∾envP}•SH"make"‿"f=-DPRECOMP"‿"t=precomp"‿"c"
|
||||
code‿out‿err←•SH"./BQN"
|
||||
•Out out
|
||||
{𝕤⋄•Out"exit code "∾(⍕code) ⋄ •Out err}⍟(×code) err
|
||||
}‿{𝕤
|
||||
# •Out 𝕩
|
||||
# "src/interp" •FChars ⟨1,path,3↓𝕩⟩ •Import "cc.bqn"
|
||||
# (×⊑)◶@‿{𝕤⋄•Out "############ Failed to compile! ############" ⋄ •Out¨1↓𝕩}{env⇐<"PATH="∾envP}•SH"./debugBuild"
|
||||
# code‿out‿err←•SH"./BQN"
|
||||
# •Out out
|
||||
# {𝕤⋄•Out"exit code "∾(⍕code) ⋄ •Out err}⍟(×code) err
|
||||
}
|
||||
}‿⊢
|
||||
}¨tests
|
||||
@ -93,6 +93,7 @@ char* pm2_repr(u8 u) {
|
||||
|
||||
B r1Objs[rtLen];
|
||||
B rtWrap_wrap(B x); // consumes
|
||||
void rtWrap_print(void);
|
||||
|
||||
|
||||
_Thread_local i64 comp_currEnvPos;
|
||||
@ -322,9 +323,9 @@ void load_init() { // very last init function
|
||||
|
||||
|
||||
#ifdef PRECOMP
|
||||
Block* c = load_compObj(
|
||||
Block* c = compile(
|
||||
#include "gen/interp"
|
||||
, bi_N, bi_N
|
||||
, bi_N, bi_N, bi_N, bi_N, NULL
|
||||
);
|
||||
B interp = m_funBlock(c, 0); ptr_dec(c);
|
||||
print(interp);
|
||||
@ -368,7 +369,6 @@ B bqn_execFile(B path, B args) { // consumes both
|
||||
return bqn_exec(file_chars(inc(path)), path, args);
|
||||
}
|
||||
|
||||
void rtWrap_print(void);
|
||||
void bqn_exit(i32 code) {
|
||||
rtWrap_print();
|
||||
CTR_FOR(CTR_PRINT)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user