Alexander Medvednikov
7385f8e56b
all: a massive merge of ast and table modules
2021-04-02 01:57:09 +03:00
Uwe Krüger
97f43d6a97
gc: make generational mode of Boehm-GC available ( #9514 )
2021-03-30 09:36:22 +02:00
Swastik Baranwal
0e254e0329
vdoc: support -os and show docs according to the platform ( #9474 )
2021-03-27 09:50:06 +01:00
Uwe Krüger
257eadd2e1
gc: add `-gc boehm_leak` for leak detection ( #9464 )
2021-03-25 16:52:33 +01:00
Delyan Angelov
7101d53d74
ci: fix `v self`, `v up` and other tools
2021-03-23 15:30:41 +02:00
Alexander Medvednikov
11e1f42193
builder: save the binary next to the source code again
2021-03-23 14:50:50 +03:00
Alexander Medvednikov
6463dfca29
Revert "Revert "builder: create the binary in the current directory if -o is not provided""
...
This reverts commit f2b73fe3ca
.
2021-03-23 14:49:09 +03:00
Delyan Angelov
f2b73fe3ca
Revert "builder: create the binary in the current directory if -o is not provided"
...
This reverts commit 9ae64e7fce
.
2021-03-23 13:27:26 +02:00
Alexander Medvednikov
9ae64e7fce
builder: create the binary in the current directory if -o is not provided
2021-03-23 12:31:02 +03:00
Alexander Medvednikov
0c055a1ce9
all: s.contains(s2) instead of `in`
2021-03-23 11:38:56 +03:00
Delyan Angelov
8810af76df
all: support `-gc boehm` on systems with libgc-dev installed ( #9382 )
2021-03-20 14:16:36 +01:00
crthpl
fafb035fb5
all: reimplement inline assembly ( #8645 )
2021-03-17 01:43:17 +01:00
Leah Lundqvist
0823ea4af1
builder: produce an iOS binary instead of a bundle ( #9316 )
2021-03-15 19:03:05 +01:00
Delyan Angelov
25c07c2f43
v.ast: handle more expressions in Expr.str()
2021-03-15 06:27:56 +02:00
Delyan Angelov
69f1e7c9c3
v: fixes for `v -autofree -o v2 cmd/v`
2021-03-14 09:37:38 +02:00
Delyan Angelov
64bc2fb40a
v: fix `[if debug] fn abc(){} ... abc()`
2021-03-07 12:05:07 +02:00
Lukas Neubert
fdcfe397d4
fmt: write empty or blocks the same as empty fn bodies, empty structs, etc ( #9136 )
2021-03-06 21:04:51 +02:00
Delyan Angelov
0f042124cb
tests: support `fn test_fn() ? { opt()? }`
2021-03-05 14:18:21 +02:00
pancake
c65d65a3f5
v: use dash instead of lowerdash for -print-v-files ( #9111 )
2021-03-04 14:38:05 +02:00
Delyan Angelov
31321b68ea
v: show help for -h, -help, and --help, in addition to `v help`
2021-03-02 12:22:10 +02:00
spaceface
b712af56fd
all: bring back `panic(err.msg)` -> `panic(err)` ( #9022 )
2021-03-01 00:18:14 +01:00
spaceface
d63b7bc35a
all: update repo to use the new error handling syntax ( #8950 )
2021-02-28 23:20:21 +03:00
Lukas Neubert
5aebd646bb
fmt: keep some line comments in multi line arrays ( #8969 )
2021-02-26 09:01:03 +02:00
spaceface
adf2aa8760
pref: add a `-debug-tcc` alias option ( #8834 )
2021-02-20 18:53:22 +02:00
Delyan Angelov
0142d58aa6
v.pref: prevent `Too many targets.` from triggering when the command is an external one
2021-02-18 12:13:28 +02:00
zakuro
b3a26ca0ce
v.pref: make passing multiple target .v files an error ( #8814 )
2021-02-18 09:42:00 +02:00
Uwe Krüger
374739b804
all: rename `[ref_only]` -> `[heap]` ( #8718 )
2021-02-13 16:52:01 +02:00
Delyan Angelov
40fff7b56a
v.pref: support `v -skip-unused run examples/hello_world.v`
2021-02-05 11:12:28 +02:00
Alexander Medvednikov
1084b43ffb
all: ast walker for marking unused fns
2021-02-05 08:05:35 +01:00
Delyan Angelov
02bef1ae2b
vdoc: fix segfault on `v doc -m -f html vlib`
2021-02-02 17:38:32 +02:00
Delyan Angelov
17062dc5c8
v.pref: support `-obf` in addition to `-obfuscate`, as described in `v help build`
2021-02-02 12:24:34 +02:00
Alexander Medvednikov
2c4674eb42
cgen: obfuscate functions
2021-02-02 09:14:41 +01:00
Lukas Neubert
cf1084105c
fmt: allow single line ternary if as function argument ( #8486 )
2021-02-01 20:08:42 +01:00
Julia Bogdan Filipchuk
d26ac0f6cb
vfmt: add ability to use vfmt as a filter from stdin to stdout ( #8432 )
2021-01-30 12:38:54 +02:00
Delyan Angelov
760b4c37b9
all: support _test.vv files (to test _test.v errors/checks too)
2021-01-30 10:42:18 +02:00
Delyan Angelov
4d180171ba
builder: implement `-dump-c-flags flags.txt`
2021-01-29 18:05:14 +02:00
Delyan Angelov
e5a84719ca
all: require calling `optfn() ?` / `optfn() or {...}` for `fn optfn() ? {}`
2021-01-26 16:43:17 +02:00
Delyan Angelov
728344ff65
ci: fix `v test-cleancode`
2021-01-25 12:55:01 +02:00
Delyan Angelov
a3908414e4
pref: fix handling of _d_custom.v files, use it in vlib/sokol/f/f_d_use_freetype.v
2021-01-23 11:21:56 +02:00
Lukas Neubert
8b61891348
fmt: smarter if condition wrapping ( #8201 )
2021-01-23 10:33:22 +02:00
Lukas Neubert
ac2c3847af
all: update copyright to 2019-2021 ( #8029 )
2021-01-18 13:20:06 +01:00
Delyan Angelov
5ae55731b9
embed: move to `v.embed_file`, fix CI failing test
2021-01-16 20:03:07 +02:00
Daniel Däschle
53941c4a0a
fmt: fix if cond break readability ( #8132 )
2021-01-16 02:12:17 +01:00
zakuro
33694665f0
fmt: align each contiguous field of struct. not the whole. ( #7981 )
2021-01-12 04:38:43 +01:00
Delyan Angelov
083dc23db8
gen: implement a `[manualfree]` tag, for functions, that want to do their own memory management
2021-01-08 16:22:27 +02:00
zakuro
dd516858d4
fmt: align struct field comments ( #7632 )
2021-01-03 21:10:25 +01:00
zakuro
1fb6710c89
build: remove `v build file.v` ( #7695 )
2020-12-31 15:24:55 +01:00
zakuro
b28b41d069
v run: pass all args after file.v only to script args, do not process them as v flags ( #7672 )
2020-12-29 21:16:20 +02:00
Delyan Angelov
100b3704cd
v.pref: fix `-nocache`, add `-no-retry-compilation`, add `-d trace_use_cache`
2020-12-28 09:42:43 +02:00
Delyan Angelov
d1223851a2
pref: support _default.c.v , overridable by _platform.c.v
2020-12-24 12:16:20 +02:00
spaceface
c544cc508b
pref: fix cross-compiling graphical apps to Windows ( #7449 )
2020-12-21 19:45:12 +02:00
Delyan Angelov
dc3a6bb169
builder: use the same compilation mode for thirdparty object files ( #7450 )
2020-12-21 17:46:26 +01:00
Alexander Medvednikov
fc965b7d92
strconv: make atoi return ?int
2020-12-21 08:35:24 +01:00
joe-conigliaro
23bfbf1665
cmd/pref: disable -usecache on windows & enable by default (commented)
2020-12-21 03:31:57 +11:00
Alexander Medvednikov
10168d307e
pref: remove duplicate flag "build"
2020-12-19 10:34:59 +01:00
Delyan Angelov
adaffd0d8e
pref: pass custom -d options down to `v build-module` (fix for -usecache)
2020-12-19 01:54:18 +02:00
Delyan Angelov
668483ee56
pref: fix -prof, to behave exactly the same as -profile
2020-12-11 09:28:34 +02:00
Delyan Angelov
d5915bde7c
parser: implement support for -Wimpure-v ( #7195 )
2020-12-08 17:52:24 +01:00
Delyan Angelov
fbf6910ab9
builder: remove executables after `v run file.v`
2020-12-05 13:03:12 +02:00
Daniel Däschle
47d0ed308d
parser: prepare for better VLS integration, more accurate parser errors ( #7119 )
2020-12-04 20:34:05 +02:00
spaceface777
50a3009113
fmt: make single-stmt `or` blocks single-line ( #7126 )
2020-12-04 13:25:23 +02:00
Alexander Medvednikov
f4bd953771
pref: vfmt
2020-12-01 04:16:36 +01:00
Alexander Medvednikov
f26f7ebc9d
pref: nocache option
2020-12-01 04:05:44 +01:00
spaceface777
83137cbe84
pref: don't use tcc by default in -prod mode ( #7053 )
2020-12-01 03:58:02 +01:00
Delyan Angelov
b11d285680
v: support multiple paths in VMODULES env variable ( #7048 )
2020-11-30 18:31:37 +01:00
Delyan Angelov
adeebad2a6
compiler: use thirdparty/tcc/tcc.exe by default, when no explicit -cc is given ( #6598 )
2020-11-29 16:18:49 +01:00
Nick Treleaven
8f15af6adc
pref: add -m32, -m64 command-line options ( #7011 )
2020-11-29 14:53:49 +01:00
Alexander Medvednikov
13948152b6
cmd/v: rename reuse-tmpc to keepc
2020-11-27 20:16:24 +01:00
Larpon
2957541e48
pref: fix message on inferred run ( #6947 )
2020-11-25 21:44:26 +02:00
Nicolas Sauzede
159932d59b
v: run code from stdin `echo println(2+2) | v run -`, with no repl limits ( #6884 )
2020-11-20 10:25:59 +02:00
Larpon
f807fd973e
compile: infer source file if a binary by the same name exists in same dir #6877
2020-11-19 16:23:55 +01:00
Delyan Angelov
f42a44abec
vfmt: fix `match x { 10 /* ... */ {} }` and `a := [1/* x */, /* y */2, 3]`
2020-11-11 22:59:43 +02:00
pancake
af5836202c
js: fix wrong filename and invalid backend selected when using -o .js ( #6777 )
2020-11-08 17:45:32 +01:00
Delyan Angelov
4b35495fbe
all: support VMODULES environment variable (defaulting to ~/.vmodules)
2020-11-08 08:07:17 +02:00
spaceface777
a9e9554b11
all: fix most C warnings ( #6758 )
2020-11-06 16:26:59 +02:00
Delyan Angelov
cf21c63183
v.vcache: extract v.vcache to a separate module, to test it and reuse it
2020-10-26 18:37:37 +02:00
Delyan Angelov
60cc8ac39c
vcache: use 2x wyhash.sum64_string(hk,x).hex_full(), instead of md5.sum(hk.bytes()).hex()
2020-10-25 09:22:31 +02:00
Delyan Angelov
5f6259dde6
v: add VCACHE support for thirdparty object files and for `v build-module`
2020-10-25 03:09:07 +03:00
Delyan Angelov
8b01146b90
compiler: implement -W and -reuse-tmpc
2020-10-24 20:34:50 +03:00
Delyan Angelov
8f85396a31
builder: use unique .tmp.c and .tmp.c.rsp files, and rm them on successfull non debug builds.
2020-10-24 15:08:45 +03:00
Delyan Angelov
9cf5c9ac43
tests: simplify print mode logic
2020-10-18 20:49:25 +03:00
Delyan Angelov
7bc94fff9a
tests: implement compact progress mode (the old one is available with -expand)
2020-10-18 19:27:29 +03:00
Enzo
b083f4014b
fmt: fix multiple things and format most of the compiler ( #6631 )
...
Format expressions inside string interpolation like the rest (it used to be a+b instead of a + b, not too sure why)
Fix formatting some match branches when there were only one statement inside (it was inlined)
Fix parsing and formatting some comments edge case on struct field init. You should check out this test because the result is a bit different from before. I personally find it more logical but I would understand if the former format was to stay
Fix formatting of void-returning function signature
2020-10-15 22:12:59 +02:00
Nicolas Sauzede
c825275f7f
pref: fix whitespace in compiler message ( #6529 )
2020-10-02 05:16:16 +02:00
Nick Treleaven
7e720a1253
pref: do not check arguments after 'run' command ( #6524 )
2020-10-01 23:30:39 +03:00
Lukas Neubert
3a8be4d8d9
os: home_dir() remove trailing slash ( #6512 )
2020-09-30 16:02:54 +02:00
Alexander Medvednikov
ae7689f739
autofree: simplify, clean up, and fix complex arg exprs
2020-09-30 07:27:24 +02:00
Delyan Angelov
dc954bbb03
all: use `macos` consistently in os.user_os and the compiler
2020-09-29 22:32:20 +03:00
Nick Treleaven
05dcdfd267
pref: error if unknown argument passed to `v` ( #6487 )
2020-09-29 03:13:54 +02:00
Alexander Medvednikov
9e31335744
pref: remove obsolete flags
2020-09-29 02:54:05 +02:00
spaceface777
ff92c3409d
ast: merge `IfExpr` and `CompIf` ( #6011 )
2020-09-18 00:58:54 +02:00
Delyan Angelov
86dfd3902f
tests: use .vv files directly in compiler_errors_test.v
2020-08-25 18:14:06 +03:00
Larpon
d9aae023b1
android: initial support for C output using sokol_main ( #6164 )
2020-08-19 11:00:15 +02:00
Delyan Angelov
e7b2aefd36
v.pref: handle `|` as separators in -path option parsing again (as documented in the help)
2020-08-15 22:09:40 +03:00
spaceface777
5f3ced7213
builder: only include `os` when building `.vsh` files ( #6134 )
2020-08-14 21:57:32 +02:00
Delyan Angelov
ca7a64a451
cgen: add support for -g again
2020-08-12 02:05:45 +03:00
Leah Lundqvist
51c9b49d3f
iOS: basic building and running ( #5999 )
2020-07-28 22:27:38 +02:00
pancake
04ef2a2671
os: implement os.system for iOS and uncomment the `$if ios` blocks ( #5947 )
2020-07-24 10:17:32 +03:00
pancake
36352085ae
v: add support for iOS crosscompilation ( #5943 )
2020-07-23 07:58:44 +03:00
Delyan Angelov
14fd7d93ca
v.pref: fix `v build file.v`
2020-07-21 19:36:58 +03:00
Delyan Angelov
e23925f2be
pref: add -show-timings option
2020-07-14 18:47:40 +03:00
Alexander Medvednikov
361d12bf43
pref: -experimental flag
2020-07-14 00:32:33 +02:00
Delyan Angelov
f1fdafcdff
pref: add -check-syntax for just parsing files, without checking them
2020-07-12 22:44:38 +03:00
Alexander Medvednikov
a2cb01e16a
parser: parse _x64.v files only with -x64
2020-07-11 19:03:59 +02:00
Alexander Medvednikov
a1073105e1
all: re-enable -prealloc
2020-07-11 11:25:56 +02:00
Delyan Angelov
25771a1afe
compiler: remove -keepc option (it is now always on)
2020-07-06 13:42:18 +03:00
Delyan Angelov
fe50bdc164
vfmt: ran `v vet vlib/v/` and fix spaces
2020-07-04 16:19:54 +03:00
Alexander Medvednikov
2bfe8e5153
vet: a basic version that just checks indentation for now
2020-06-27 14:50:07 +02:00
spaceface777
68967e833d
parser: skip comp_if when building for a different compiler
2020-06-18 22:01:00 +02:00
Delyan Angelov
5ef9569098
cmd/tools: add check_os_api_parity.v - keep module APIs even
2020-06-11 21:13:36 +03:00
Alexander Medvednikov
a130d3cd14
vweb: fix unused var warning
2020-06-10 12:17:49 +02:00
Lukas Neubert
eec5cf1eb1
vpm: use only `-v` for verbose output
2020-06-07 14:20:56 +02:00
Ned Palacios
30e0bda434
vdoc: rewrite usage, add new options + streamline process
2020-06-05 09:59:26 +02:00
yuyi
5ae8853648
all: change `f mut Foo` to `mut f Foo`
2020-06-04 10:35:40 +02:00
Alexander Medvednikov
99c70cf9c6
pref: do not allow -o .v
2020-06-03 09:03:46 +02:00
Mike 'Fuzzy' Partin
ac0fee8e64
repl: fix BSDs
2020-06-03 08:44:44 +03:00
Alexander Medvednikov
3d83934caf
checker: check mutating methods; generics fixes
2020-06-01 15:44:10 +02:00
Delyan Angelov
d70cd81875
v.pref: remove 'setting pref.path to ...' when given -v
2020-05-28 18:41:26 +03:00
Julia K
2b27072fac
compiler: new attributes, prelude customization
2020-05-26 14:12:18 +02:00
Julia K
b4eadb9030
cmd/v: reimplement -path flag
2020-05-26 03:17:52 +02:00
pancake
fe249cd1f8
pref: fix crash in 'v run' without arguments
2020-05-25 12:30:12 +02:00
Alexander Medvednikov
85d19dd253
cmd/v: error-limit
2020-05-24 04:47:51 +02:00
Alexander Medvednikov
67750c91d7
generics: lots of fixes
2020-05-24 04:43:03 +02:00
Alexander Medvednikov
1e853072dc
parser: parallel parser, part 1
2020-05-22 02:23:14 +02:00
Delyan Angelov
9d4fe88d09
compiler: support for -color/-nocolor option overrides
2020-05-20 20:34:04 +03:00
Alexander Medvednikov
8cbb9e1c1f
pref: move parse_define()
2020-05-16 22:57:55 +02:00
Alexander Medvednikov
0845b2cfbe
builder: skip warnings; pref: move pref creation to pref.v
2020-05-16 22:45:38 +02:00
yuyi
6d0b791ac8
parser: warning about unused imports
2020-05-14 17:14:24 +02:00
Delyan Angelov
d830620651
compiler: restore support for --enable-globals flag, and add tests.
2020-05-14 08:43:12 +03:00
Alexander Medvednikov
aacc35db19
pref: do not enable globals by default
2020-05-11 15:19:47 +02:00
Ned Palacios
5f0ad0f562
compiler: add output mode for errors and warnings, support for `-silent` flag
2020-05-10 12:26:57 +03:00
Alexander Medvednikov
3052266a40
live: make compile; pref: allow _linux.v etc
2020-05-09 20:31:50 +02:00
Delyan Angelov
e08566d571
compiler: do not exit early, when given -o x.c or -o x.js
2020-05-08 15:31:03 +03:00
Delyan Angelov
4c320e1512
profile: support for -profile-no-inline (with it, [inline] fns will not get profiled)
2020-05-08 15:01:59 +03:00
Delyan Angelov
f9fe5b60a7
v doc: skip _x.c.v when not on x, i.e. filter files like v itself
2020-05-05 08:08:03 +03:00
Delyan Angelov
7038f59ca5
compiler: add back support for -live
2020-05-02 01:14:44 +03:00
Delyan Angelov
a6dfc6d46b
compiler: support ctags with -print_v_files and .ctags.d/v.ctags
2020-04-30 19:45:50 +03:00
Delyan Angelov
e67bf674e3
scanner: cleanup, only v.parser now depends on v.scanner
2020-04-27 16:08:04 +03:00
Alexander Medvednikov
eb8973c362
builder: module caching fixes
2020-04-27 14:46:25 +02:00
Alexander Medvednikov
f005079e0b
pref: rename keep_c
2020-04-27 13:28:00 +02:00
Enzo Baldisserri
3e68e429b6
checker: avert if else is unnecessary
2020-04-25 21:51:44 +02:00
Enzo Baldisserri
fb54a2635c
fmt: lots of fixes
2020-04-25 17:49:16 +02:00
Delyan Angelov
4bcdf11743
cgen: support `-profile -` and `-profile x.txt`
2020-04-25 13:41:49 +03:00
Delyan Angelov
e0ab318f56
cgen: add support for `v -printfn main file.v`
2020-04-25 11:15:57 +03:00
Tim Basel
86df486988
compiler: rename is_so to is_shared
2020-04-18 17:46:23 +02:00
Alexander Medvednikov
9422cd1009
parser: handle mut & receivers; fix checker_error_test
2020-04-11 02:24:00 +02:00
lutherwenxu
514d989a27
builder: parse `.c.v` and `.js.v` correctly
2020-04-10 18:25:23 +02:00
Alexander Medvednikov
f3c917e0aa
fmt: fix array receivers; cmd/v: -showcc
2020-04-09 15:05:06 +02:00
Alexander Medvednikov
fa5fcee584
cmd/v: fix run args
2020-04-07 03:21:32 +02:00
Alexander Medvednikov
8d150d427a
merge and simplify cmd/v and v.builder
2020-04-07 00:44:31 +02:00