compiler: separate package exports from entry roots
This commit is contained in:
@@ -2,13 +2,14 @@ package wcc;
|
||||
|
||||
import syntax;
|
||||
|
||||
export fn compilefile(file: *syntax.node, testmode: i32, testmodule: str,
|
||||
sepmode: i32, wwiout: str) i32 = {
|
||||
export fn compilefile(file: *syntax.node, testmode: i32, testpackage: i32,
|
||||
testmodule: str, sepmode: i32, wwiout: str, entrymode: i32) i32 = {
|
||||
let tc: syntax.tctx;
|
||||
syntax.typesinit(&tc);
|
||||
let ck: checker;
|
||||
checkinit(&ck, &tc);
|
||||
ck.istest = testmode;
|
||||
ck.istestpackage = testpackage;
|
||||
if (testmodule.len > 0) { ck.testmodule = testmodule; };
|
||||
ck.sepmode = sepmode;
|
||||
checkfile(&ck, file);
|
||||
@@ -20,7 +21,7 @@ export fn compilefile(file: *syntax.node, testmode: i32, testmodule: str,
|
||||
let cg: cgen;
|
||||
cgeninit(&cg);
|
||||
cg.sepmode = sepmode;
|
||||
if (wwiout.len > 0) { cg.sepisdep = 1i32; };
|
||||
if (wwiout.len > 0 && entrymode == 0) { cg.sepisdep = 1i32; };
|
||||
cgfile(&cg, file);
|
||||
return 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user