ci: fix building vdoc, vls, etc

pull/8574/head
Delyan Angelov 2021-02-05 09:27:14 +02:00
parent 395fcc1476
commit e5c9fcb7e9
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
4 changed files with 5 additions and 12 deletions

View File

@ -27,7 +27,6 @@ pub mut:
parsed_files []ast.File
cached_msvc MsvcResult
table &table.Table
table2 &ast.Table
timers &util.Timers = util.new_timers(false)
ccoptions CcompilerOptions
}
@ -37,7 +36,6 @@ pub fn new_builder(pref &pref.Preferences) Builder {
compiled_dir := if os.is_dir(rdir) { rdir } else { os.dir(rdir) }
mut table := table.new_table()
table.is_fmt = false
table2 := &ast.Table{}
if pref.use_color == .always {
util.emanager.set_support_color(true)
}
@ -55,8 +53,7 @@ pub fn new_builder(pref &pref.Preferences) Builder {
return Builder{
pref: pref
table: table
table2: table2
checker: checker.new_checker(table, table2, pref)
checker: checker.new_checker(table, pref)
global_scope: &ast.Scope{
parent: 0
}

View File

@ -22,7 +22,7 @@ pub fn (mut b Builder) gen_c(v_files []string) string {
b.print_warnings_and_errors()
// TODO: move gen.cgen() to c.gen()
b.timing_start('C GEN')
res := c.gen(b.parsed_files, b.table, b.table2, b.pref)
res := c.gen(b.parsed_files, b.table, b.pref)
b.timing_measure('C GEN')
// println('cgen done')
// println(res)

View File

@ -38,7 +38,6 @@ pub struct Checker {
pref &pref.Preferences // Preferences shared from V struct
pub mut:
table &table.Table
table2 &ast.Table
file &ast.File = 0
nr_errors int
nr_warnings int
@ -84,14 +83,13 @@ mut:
main_fn_decl_node ast.FnDecl
}
pub fn new_checker(table &table.Table, table2 &ast.Table, pref &pref.Preferences) Checker {
pub fn new_checker(table &table.Table, pref &pref.Preferences) Checker {
mut timers_should_print := false
$if time_checking ? {
timers_should_print = true
}
return Checker{
table: table
table2: table2
pref: pref
cur_fn: 0
timers: util.new_timers(timers_should_print)
@ -3859,7 +3857,7 @@ fn (mut c Checker) comptime_call(mut node ast.ComptimeCall) table.Type {
...pref_
is_vweb: true
}
mut c2 := new_checker(c.table, c.table2, pref2)
mut c2 := new_checker(c.table, pref2)
c2.check(node.vweb_tmpl)
mut i := 0 // tmp counter var for skipping first three tmpl vars
for k, _ in c2.file.scope.children[0].objects {

View File

@ -32,7 +32,6 @@ struct Gen {
module_built string
mut:
table &table.Table
table2 &ast.Table
out strings.Builder
cheaders strings.Builder
includes strings.Builder // all C #includes required by V modules
@ -154,7 +153,7 @@ mut:
// main_fn_decl_node ast.FnDecl
}
pub fn gen(files []ast.File, table &table.Table, table2 &ast.Table, pref &pref.Preferences) string {
pub fn gen(files []ast.File, table &table.Table, pref &pref.Preferences) string {
// println('start cgen2')
mut module_built := ''
if pref.build_mode == .build_module {
@ -193,7 +192,6 @@ pub fn gen(files []ast.File, table &table.Table, table2 &ast.Table, pref &pref.P
enum_typedefs: strings.new_builder(100)
sql_buf: strings.new_builder(100)
table: table
table2: table2
pref: pref
fn_decl: 0
is_autofree: true