mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools: fix some noise in the output of v test-all
This commit is contained in:
parent
598992b208
commit
5bb02b3dd7
@ -142,25 +142,28 @@ fn get_all_commands() []Command {
|
||||
line: '${vexe} run examples/v_script.vsh > /dev/null'
|
||||
okmsg: 'V can run the .VSH script file examples/v_script.vsh'
|
||||
}
|
||||
// Note: -experimental is used here, just to suppress the warningss,
|
||||
// that are otherwise printed by the native backend,
|
||||
// until globals and hash statements *are implemented*:
|
||||
$if linux {
|
||||
res << Command{
|
||||
line: '${vexe} -b native run examples/native/hello_world.v > /dev/null'
|
||||
line: '${vexe} -experimental -b native run examples/native/hello_world.v > /dev/null'
|
||||
okmsg: 'V compiles and runs examples/native/hello_world.v on the native backend for linux'
|
||||
}
|
||||
}
|
||||
// only compilation:
|
||||
res << Command{
|
||||
line: '${vexe} -os linux -b native -o hw.linux examples/hello_world.v'
|
||||
line: '${vexe} -os linux -experimental -b native -o hw.linux examples/hello_world.v'
|
||||
okmsg: 'V compiles hello_world.v on the native backend for linux'
|
||||
rmfile: 'hw.linux'
|
||||
}
|
||||
res << Command{
|
||||
line: '${vexe} -os macos -b native -o hw.macos examples/hello_world.v'
|
||||
line: '${vexe} -os macos -experimental -b native -o hw.macos examples/hello_world.v'
|
||||
okmsg: 'V compiles hello_world.v on the native backend for macos'
|
||||
rmfile: 'hw.macos'
|
||||
}
|
||||
res << Command{
|
||||
line: '${vexe} -os windows -b native -o hw.exe examples/hello_world.v'
|
||||
line: '${vexe} -os windows -experimental -b native -o hw.exe examples/hello_world.v'
|
||||
okmsg: 'V compiles hello_world.v on the native backend for windows'
|
||||
rmfile: 'hw.exe'
|
||||
}
|
||||
|
@ -207,13 +207,13 @@ fn overhead_for(c &Chunk) usize {
|
||||
//
|
||||
// Why not `interface?` Interfaces require memory allocation so it is simpler to pass a struct.
|
||||
pub struct Allocator {
|
||||
alloc fn (voidptr, usize) (voidptr, usize, u32)
|
||||
remap fn (voidptr, voidptr, usize, usize, bool) voidptr
|
||||
free_part fn (voidptr, voidptr, usize, usize) bool
|
||||
free_ fn (voidptr, voidptr, usize) bool
|
||||
can_release_part fn (voidptr, u32) bool
|
||||
allocates_zeros fn (voidptr) bool
|
||||
page_size fn (voidptr) usize // not a constant field because some platforms might have different page sizes depending on configs
|
||||
alloc fn (voidptr, usize) (voidptr, usize, u32) = unsafe { nil }
|
||||
remap fn (voidptr, voidptr, usize, usize, bool) voidptr = unsafe { nil }
|
||||
free_part fn (voidptr, voidptr, usize, usize) bool = unsafe { nil }
|
||||
free_ fn (voidptr, voidptr, usize) bool = unsafe { nil }
|
||||
can_release_part fn (voidptr, u32) bool = unsafe { nil }
|
||||
allocates_zeros fn (voidptr) bool = unsafe { nil }
|
||||
page_size fn (voidptr) usize = unsafe { nil } // not a constant field because some platforms might have different page sizes depending on configs
|
||||
data voidptr
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ enum Builtin {
|
||||
}
|
||||
|
||||
struct BuiltinFn {
|
||||
body fn (builtin BuiltinFn, mut g Gen)
|
||||
body fn (builtin BuiltinFn, mut g Gen) = unsafe { nil }
|
||||
arg_regs []Register
|
||||
mut:
|
||||
calls []i64 // call addresses
|
||||
|
@ -83,8 +83,10 @@ fn (mut g Gen) stmt(node ast.Stmt) {
|
||||
}
|
||||
|
||||
if unsupported {
|
||||
g.warning('opcodes format: xx xx xx xx\nhash statements are not allowed with the native backend, use the C backend for extended C interoperability.',
|
||||
node.pos)
|
||||
if !g.pref.experimental {
|
||||
g.warning('opcodes format: xx xx xx xx\nhash statements are not allowed with the native backend, use the C backend for extended C interoperability.',
|
||||
node.pos)
|
||||
}
|
||||
}
|
||||
}
|
||||
ast.Module {}
|
||||
@ -98,7 +100,9 @@ fn (mut g Gen) stmt(node ast.Stmt) {
|
||||
g.gen_assert(node)
|
||||
}
|
||||
ast.GlobalDecl {
|
||||
g.warning('globals are not supported yet', node.pos)
|
||||
if !g.pref.experimental {
|
||||
g.warning('globals are not supported yet', node.pos)
|
||||
}
|
||||
}
|
||||
ast.Import {} // do nothing here
|
||||
ast.StructDecl {}
|
||||
|
@ -12,8 +12,8 @@ pub:
|
||||
vopts string // v compiler options for a live shared library
|
||||
original string // full path to the original source file, compiled with -live
|
||||
live_fn_mutex voidptr // the address of the C mutex, that locks the [live] fns during reloads.
|
||||
live_linkfn FNLinkLiveSymbols // generated C callback; receives a dlopen handle
|
||||
so_extension string // .so or .dll
|
||||
live_linkfn FNLinkLiveSymbols = unsafe { nil } // generated C callback; receives a dlopen handle
|
||||
so_extension string // .so or .dll
|
||||
so_name_template string // a template for the shared libraries location
|
||||
pub mut:
|
||||
monitored_files []string // an array, containing all paths that should be monitored for changes
|
||||
|
Loading…
Reference in New Issue
Block a user