mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
markused: fix v -gc boehm -skip-unused cmd/vls
This commit is contained in:
parent
727c9fb4a1
commit
4597c74d1a
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -829,6 +829,8 @@ jobs:
|
||||
run: pushd vls; v cmd/vls ; popd
|
||||
- name: Build VLS with -prod
|
||||
run: pushd vls; v -prod cmd/vls; popd
|
||||
- name: Build VLS with -gc boehm -skip-unused
|
||||
run: pushd vls; v -gc boehm -skip-unused cmd/vls; popd
|
||||
|
||||
## vsl
|
||||
- name: Clone VSL
|
||||
@ -863,6 +865,8 @@ jobs:
|
||||
run: git clone --depth 1 https://github.com/vlang/vab
|
||||
- name: Build vab
|
||||
run: cd vab; ../v ./vab.v ; cd ..
|
||||
- name: Build vab with -gc boehm -skip-unused
|
||||
run: cd vab; ../v -gc boehm -skip-unused ./vab.v ; cd ..
|
||||
|
||||
## gitly
|
||||
- name: Install markdown
|
||||
@ -885,6 +889,8 @@ jobs:
|
||||
run: mkdir -p ~/.vmodules/nedpals; git clone https://github.com/nedpals/vex ~/.vmodules/nedpals/vex
|
||||
- name: Compile the simple Vex example
|
||||
run: ./v ~/.vmodules/nedpals/vex/examples/simple_example.v
|
||||
- name: Compile the simple Vex example with -gc boehm -skip-unused
|
||||
run: ./v -gc boehm -skip-unused ~/.vmodules/nedpals/vex/examples/simple_example.v
|
||||
- name: Run Vex Tests
|
||||
run: ./v test ~/.vmodules/nedpals/vex
|
||||
|
||||
|
@ -131,34 +131,17 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []&ast.F
|
||||
]
|
||||
}
|
||||
|
||||
if pref.gc_mode in [.boehm_full_opt, .boehm_incr_opt] {
|
||||
all_fn_root_names << [
|
||||
'memdup_noscan',
|
||||
'__new_array_noscan',
|
||||
'__new_array_with_default_noscan',
|
||||
'__new_array_with_array_default_noscan',
|
||||
'new_array_from_c_array_noscan',
|
||||
'22.clone_static_to_depth_noscan',
|
||||
'22.clone_to_depth_noscan',
|
||||
'22.reverse_noscan',
|
||||
'22.repeat_to_depth_noscan',
|
||||
'65558.pop_noscan',
|
||||
'65558.push_noscan',
|
||||
'65558.push_many_noscan',
|
||||
'65558.insert_noscan',
|
||||
'65558.insert_many_noscan',
|
||||
'65558.prepend_noscan',
|
||||
'65558.prepend_many_noscan',
|
||||
'65558.reverse_noscan',
|
||||
'65558.grow_cap_noscan',
|
||||
'65558.grow_len_noscan',
|
||||
]
|
||||
}
|
||||
is_noscan_whitelisted := pref.gc_mode in [.boehm_full_opt, .boehm_incr_opt]
|
||||
|
||||
for k, mut mfn in all_fns {
|
||||
$if trace_skip_unused_all_fns ? {
|
||||
println('k: $k | mfn: $mfn.name')
|
||||
}
|
||||
// _noscan functions/methods are selected when the `-gc boehm` is on:
|
||||
if is_noscan_whitelisted && mfn.name.ends_with('_noscan') {
|
||||
all_fn_root_names << k
|
||||
continue
|
||||
}
|
||||
mut method_receiver_typename := ''
|
||||
if mfn.is_method {
|
||||
method_receiver_typename = table.type_to_str(mfn.receiver.typ)
|
||||
|
Loading…
Reference in New Issue
Block a user