mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
@ -472,8 +472,7 @@ pub fn building_any_v_binaries_failed() bool {
|
||||
mut failed := false
|
||||
v_build_commands := ['$vexe -o v_g -g cmd/v', '$vexe -o v_prod_g -prod -g cmd/v',
|
||||
'$vexe -o v_cg -cg cmd/v', '$vexe -o v_prod_cg -prod -cg cmd/v',
|
||||
'$vexe -o v_prod -prod cmd/v',
|
||||
]
|
||||
'$vexe -o v_prod -prod cmd/v']
|
||||
mut bmark := benchmark.new_benchmark()
|
||||
for cmd in v_build_commands {
|
||||
bmark.step()
|
||||
|
@ -56,15 +56,18 @@ fn (c Context) compare_versions() {
|
||||
'v @DEBUG@ -o source.c examples/hello_world.v',
|
||||
'v -o source.c examples/hello_world.v',
|
||||
])
|
||||
perf_files << c.compare_v_performance('source_v', ['vprod @DEBUG@ -o source.c @COMPILER@',
|
||||
'vprod -o source.c @COMPILER@', 'v @DEBUG@ -o source.c @COMPILER@',
|
||||
perf_files << c.compare_v_performance('source_v', [
|
||||
'vprod @DEBUG@ -o source.c @COMPILER@',
|
||||
'vprod -o source.c @COMPILER@',
|
||||
'v @DEBUG@ -o source.c @COMPILER@',
|
||||
'v -o source.c @COMPILER@',
|
||||
])
|
||||
perf_files << c.compare_v_performance('binary_hello', [
|
||||
'vprod -o hello examples/hello_world.v',
|
||||
'v -o hello examples/hello_world.v',
|
||||
])
|
||||
perf_files << c.compare_v_performance('binary_v', ['vprod -o binary @COMPILER@',
|
||||
perf_files << c.compare_v_performance('binary_v', [
|
||||
'vprod -o binary @COMPILER@',
|
||||
'v -o binary @COMPILER@',
|
||||
])
|
||||
println('All performance files:')
|
||||
@ -107,8 +110,7 @@ fn (c &Context) prepare_v(cdir string, commit string) {
|
||||
scripting.show_sizes_of_files(['$cdir/cv', '$cdir/cv_stripped', '$cdir/cv_stripped_upxed'])
|
||||
scripting.show_sizes_of_files(['$cdir/v', '$cdir/v_stripped', '$cdir/v_stripped_upxed'])
|
||||
scripting.show_sizes_of_files(['$cdir/vprod', '$cdir/vprod_stripped',
|
||||
'$cdir/vprod_stripped_upxed',
|
||||
])
|
||||
'$cdir/vprod_stripped_upxed'])
|
||||
vversion := scripting.run('$cdir/v -version')
|
||||
vcommit := scripting.run('git rev-parse --short --verify HEAD')
|
||||
println('V version is: $vversion , local source commit: $vcommit')
|
||||
|
@ -149,8 +149,7 @@ fn color_highlight(code string, tb &ast.Table) string {
|
||||
.string {
|
||||
use_double_quote := tok.lit.contains("'") && !tok.lit.contains('"')
|
||||
unescaped_val := tok.lit.replace('\\\\', '\x01').replace_each(["\\'", "'", '\\"',
|
||||
'"',
|
||||
])
|
||||
'"'])
|
||||
if use_double_quote {
|
||||
s := unescaped_val.replace_each(['\x01', '\\\\', '"', '\\"'])
|
||||
lit = term.yellow('"$s"')
|
||||
|
@ -289,11 +289,9 @@ fn (mut vd VDoc) generate_docs_from_file() {
|
||||
}
|
||||
}
|
||||
}
|
||||
dirs := if cfg.is_multi {
|
||||
get_modules_list(cfg.input_path, []string{})
|
||||
} else {
|
||||
[cfg.input_path]
|
||||
}
|
||||
dirs := if cfg.is_multi { get_modules_list(cfg.input_path, []string{}) } else { [
|
||||
cfg.input_path,
|
||||
] }
|
||||
for dirpath in dirs {
|
||||
vd.vprintln('Generating $out.typ docs for "$dirpath"')
|
||||
mut dcs := doc.generate(dirpath, cfg.pub_only, true, cfg.platform, cfg.symbol_name) or {
|
||||
|
Reference in New Issue
Block a user