Commit Graph

69 Commits (c7a619d16e8e7e4facddeace7222fcaba9919d53)

Author SHA1 Message Date
lemon c7a619d16e
native: support `else`, `break`, `continue` (#14738) 2022-06-11 11:50:19 +03:00
Spydr 8563696476
native: added new helper functions (#14723) 2022-06-08 23:16:15 +03:00
spaceface 332e821518
checker, gen: add support for a [minify] struct attribute (#14247) 2022-05-02 01:59:17 +03:00
Alexander Medvednikov fbb9e65c0f all: ~500 more byte=>u8 2022-04-15 18:25:45 +03:00
Alexander Medvednikov fb192d949b all: replace []byte with []u8 2022-04-15 15:35:35 +03:00
Alexander Medvednikov d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
pancake a1d0db792e
native: initial support for typeof() expressions (#13730) 2022-03-14 15:15:06 +02:00
yuyi 27f9bc9ba0
checker: check error for match mut with immutable variable (fix #9704 #8976) (#13725) 2022-03-13 09:53:29 +02:00
Delyan Angelov 83762fa4a4
native: align the disassembly/comment column in the `-v -b native` output 2022-03-12 11:09:09 +02:00
pancake 3f1e232c9b
native: support comparing two idents and avoid printing idents (#13686) 2022-03-08 19:52:30 +02:00
pancake b20c911d3e
native: generate relocatable ELFs and support relative strings (#13671) 2022-03-07 18:24:01 +02:00
yuyi 291a1ffd8d
token: rename Position to Pos, rename position() to pos() (#13279) 2022-01-26 12:36:28 +02:00
Delyan Angelov 359b674cff
ci: fix more failing tests 2022-01-22 23:18:09 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
yuyi cd0b581445
ast: rename 'table.get_type_symbol()' to 'table.sym()' and more related calls (#12898) 2021-12-19 18:25:18 +02:00
Delyan Angelov 47aa2b1f93
all: fix casting of `string(MyString('abc'))` and `byte(MyByte(123))`; improve TypeSymbol handling (#12617) 2021-12-01 09:50:53 +02:00
pancake 1b691e7612
native: implement for-c and for-in range loops (#12155) 2021-11-30 11:49:30 +02:00
Delyan Angelov 6d97b0a407
checker: improve checking of a << b, when a and b are numbers (#12589) 2021-11-29 03:48:49 +03:00
pancake 89bab98833
native: implement a working hello world compilation for w64 (#12577) 2021-11-26 19:03:15 +02:00
pancake 80a4ff9900
native: handle some more statements and dont echo warnings (#12518) 2021-11-19 13:50:44 +02:00
pancake b367ed9ba3
native: support defining functions in any order (#12511) 2021-11-19 10:25:42 +02:00
pancake ade5774313
native: fix return `a+b` infix construction (#12161) 2021-10-12 19:38:17 +03:00
pancake 1d2b56d71d
native: fix example exit((1,2)->(a,b)return a+b) (#12154) 2021-10-12 18:51:28 +03:00
pancake 347ebe5fd3
native: append .exe, when using the native backend on windows (#12159) 2021-10-12 18:49:42 +03:00
pancake a0a0ae85eb
native: add support for pe64 when -os windows is used (#12149) 2021-10-12 10:43:40 +03:00
pancake 5eba02ea94
native: fix stackframe bug on return statements (#12153) 2021-10-12 06:03:44 +03:00
ChAoS_UnItY d0c961ebc0
transformer: eliminate unreachable branches in IfExpr and fold more expressions and statements (#12135)
* v: fix using constant as length in fixed array

* format test file

* v/trasnformer: discard unreachable if branches

* transform more expressions and statements

* replace IfExpr with EmptyExpr when all branches were eliminated

* fix typo

* fix gens

* only allows branch elimination on if expression statement

* fix native gen

* fix handling of multi branch ifs in the native backend, also allow for `if true {}`

Co-authored-by: KyleLin921021 <43753315+KyleLin921021@users.noreply.github.com>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2021-10-11 14:29:17 +03:00
pancake 7a6491b9b0
native: initial implementation of C.syscall (#12098) 2021-10-09 15:01:30 +03:00
Alexander Medvednikov afeb1525a1 native: rename cgen to code_gen to avoid confusion with cgen 2021-09-10 03:17:53 +03:00
Alexander Medvednikov 0370d4f268 native: fix macho test 2021-09-09 23:00:54 +03:00
Alexander Medvednikov ab3adf3346 checker: no longer allow automatic dereferncing in `a = b` 2021-09-09 20:21:01 +03:00
pancake ddc62ab0d3
native: native prints (#11426) 2021-09-07 15:44:15 +03:00
Alexander Medvednikov cf4081e2dd all: more chdir/chmod fixes 2021-08-28 12:52:48 +03:00
Alexander Medvednikov 853d3cb83e os: make chmod() return error 2021-08-28 09:37:24 +03:00
Alexander Medvednikov 858ba25d55 os: make chdir() return error 2021-08-28 09:35:39 +03:00
pancake 3c85a03b8a
v.gen.native: initial support for the asm statement in the native backend (#11292) 2021-08-24 15:30:41 +03:00
pancake 57b148032f
v.gen.native: initial support for cast statements (#11291) 2021-08-24 15:26:49 +03:00
pancake 02d823fa6e
v.gen.native: support infinite loops `for {}` in amd64 and arm64 (#11254) 2021-08-20 14:23:15 +03:00
pancake 82b16453e4
v.gen.native: improve error messages for unsupported features (#11253) 2021-08-20 14:21:05 +03:00
pancake 2cfb8fd697
native: document arm64 registers with comments (#11122) 2021-08-10 21:15:32 +03:00
pancake e7b8cf17e5
v.gen.native: add support for assert statements for amd64 (#11117) 2021-08-10 10:29:44 +03:00
pancake 00d4c7082e
native: add support for print, eprint and eprintln (#11034) 2021-08-03 16:04:31 +03:00
pancake dbf5c976a3
v.gen.native: support more `ifs` constructs for amd64 (#11007) 2021-08-01 20:19:02 +03:00
Daniel Däschle 6fa8e4269e
checker: force interface init (#10910) 2021-07-30 03:18:20 +03:00
pancake 6337325676
v.gen.native: improve few x64 generators (#10996) 2021-07-30 01:26:49 +03:00
Delyan Angelov 45a15755b8
v.builder: implement -show-callgraph 2021-07-24 13:32:56 +03:00
Delyan Angelov 72c56ccc85
v.builder: use os.write_file/os.write_file_array for writing full files to disk. 2021-07-24 13:32:55 +03:00
Delyan Angelov 241a7b760d
strconv,checker,cgen: fix -cstrict compilation of hello_world.v 2021-07-19 01:08:48 +03:00
yuyi a5c784830b
all: simplify global_scope processing (#10848) 2021-07-18 15:29:34 +03:00
Delyan Angelov 972542d6ee
checker: `[noreturn]` part 2 (cleanup) (#10667) 2021-07-05 05:05:37 +03:00