Skip to content

Commit 8e35f4d

Browse files
committed
all: super_batch6 fixes
1 parent 491b27e commit 8e35f4d

347 files changed

Lines changed: 1712 additions & 655 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bench/bench_gc.v

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ fn run_comparison() {
269269

270270
// Print comparison table
271271
println('')
272-
println(' ${rpad('test', 44)} ${lpad('boehm', 9)} ${lpad('vgc', 9)} ${lpad('ratio',
273-
9)}')
272+
println(' ${rpad('test', 44)} ${lpad('boehm', 9)} ${lpad('vgc', 9)} ${lpad('ratio', 9)}')
274273
println(' ${'—'.repeat(44)} ${'—'.repeat(9)} ${'—'.repeat(9)} ${'—'.repeat(9)}')
275274

276275
for ti in 0 .. 5 {
@@ -287,8 +286,8 @@ fn run_comparison() {
287286
''
288287
}
289288
label := '${ratio:.2f}x${winner}'
290-
println(' ${rpad(test_name(ti), 44)} ${lpad('${mb} ms', 9)} ${lpad('${mv} ms',
291-
9)} ${lpad(label, 9)}')
289+
println(' ${rpad(test_name(ti), 44)} ${lpad('${mb} ms', 9)} ${lpad('${mv} ms', 9)} ${lpad(label,
290+
9)}')
292291
}
293292
294293
// Heap usage

bench/bench_soa_structs.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ fn main() {
374374
mut soa_integrate := build_soa()
375375
result_aos_integrate := bench_integrate_aos(mut aos_integrate)
376376
result_soa_integrate := bench_integrate_soa(mut soa_integrate)
377-
print_result('integrate position, velocity, and life', result_aos_integrate, result_soa_integrate)
377+
print_result('integrate position, velocity, and life', result_aos_integrate,
378+
result_soa_integrate)
378379
C.Particle_SOA_free(&soa_integrate)
379380
}

ci/common/runner.v

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,23 @@ import time
77

88
// exec is a helper function, to execute commands and exit early, if they fail.
99
pub fn exec(command string) {
10-
log.info('cmd: ${command}')
11-
result := os.system(command)
10+
cmd := resolve_v_command(command)
11+
log.info('cmd: ${cmd}')
12+
result := os.system(cmd)
1213
if result != 0 {
1314
exit(result)
1415
}
1516
}
1617

18+
// resolve_v_command ensures that commands starting with `v ` use the V from @VEXEROOT,
19+
// not a potentially different V found via PATH.
20+
fn resolve_v_command(command string) string {
21+
if command.starts_with('v ') {
22+
return os.quoted_path(os.join_path_single(@VEXEROOT, 'v')) + command[1..]
23+
}
24+
return command
25+
}
26+
1727
// unset is a helper function to unset a specific env variable.
1828
pub fn unset(evar string) {
1929
log.info('unsetting env variable: ${evar}')
@@ -37,7 +47,7 @@ pub fn file_size_greater_than(fpath string, min_fsize u64) {
3747
}
3848
}
3949

40-
const self_command = 'v ' +
50+
const self_command = os.quoted_path(os.join_path_single(@VEXEROOT, 'v')) + ' ' +
4151
os.real_path(os.executable()).replace_once(os.real_path(@VEXEROOT), '').trim_left('/\\') +
4252
'.vsh'
4353

cmd/tools/changelog_helper.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ fn (mut app App) process_line(text string) ! {
265265
}
266266
else {}
267267
}
268+
268269
app.counter++
269270
} else {
270271
line := Line{category, s}

cmd/tools/modules/testing/output_normal.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ fn (r &NormalReporter) show_longest(label string, limit int, kind TaskKind) {
114114
tasks = mall.values()
115115
}
116116
}
117+
117118
tasks.sort(a.duration > b.duration)
118119
for tidx, task in tasks {
119120
npath := task.path.replace('\\', '/').replace(r.vroot, '')

cmd/tools/vast/vast.v

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import v.pref
1010
import v.errors
1111
import v.checker
1212
import strings
13+
import context
1314

1415
struct Context {
1516
mut:
@@ -397,6 +398,7 @@ fn (t Tree) scope_object(node ast.ScopeObject) &Node {
397398
ast.Var { t.var(node) }
398399
ast.AsmRegister { t.asm_register(node) }
399400
}
401+
400402
return obj
401403
}
402404

@@ -488,6 +490,7 @@ fn (t Tree) stmt(node ast.Stmt) &Node {
488490
ast.EmptyStmt { return t.empty_stmt(node) }
489491
ast.DebuggerStmt { return t.debugger_stmt(node) }
490492
}
493+
491494
return t.null_node()
492495
}
493496

cmd/tools/vcheck-md.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ fn (mut f MDFile) check_link_target_match(ad AnchorData) {
586586
anchor.line
587587
}
588588
}
589+
589590
wprintln(wline(f.path, line, 0,
590591
'multiple link target for non existing link (#${link})'))
591592
found_error_warning = true

cmd/tools/vcomplete.v

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ fn auto_complete(args []string) {
533533
}
534534
else {}
535535
}
536+
536537
exit(0)
537538
}
538539

@@ -653,6 +654,7 @@ fn auto_complete_request(args []string) []string {
653654
}
654655
}
655656
}
657+
656658
// Clear the list if the result is identical to the part examined
657659
// (the flag must have already been completed)
658660
if list.len == 1 && part == list[0] {
@@ -798,6 +800,7 @@ Register-ArgumentCompleter -Native -CommandName v -ScriptBlock {
798800
}
799801
else {}
800802
}
803+
801804
return setup
802805
}
803806

cmd/tools/vcompress.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ fn main() {
2222
exit(1)
2323
}
2424
}
25+
2526
path := os.args[3]
2627
content := os.read_bytes(path) or {
2728
eprintln('unable to read "${path}": ${err}')
@@ -35,6 +36,7 @@ fn main() {
3536
}
3637
}
3738
}
39+
3840
out_path := os.args[4]
3941

4042
os.write_file_array(out_path, compressed) or {

cmd/tools/vcreate/vcreate.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,5 +331,6 @@ fn (mut c Create) create_files_and_directories() {
331331
.lib { 'library' }
332332
.web { 'web' }
333333
}
334+
334335
println('Created ${kind} project `${c.name}`')
335336
}

0 commit comments

Comments
 (0)