Techatrix
30869d7d87
InternPool: replace untyped values with typed values ( #1023 )
...
* InternPool: replace untyped values with typed values
* InternPool: remove `indexToTag`
* InternPool: rework representation of optional values
* add representation for unknown values and types
* ComptimeInterpreter: use InternPool typed-values
* ComptimeInterpreter: field access test
* ComptimeInterpreter: improve handling of if expressions
* InternPool: fix typeOf on a comptime float
* ComptimeInterpreter: implement TypeOf with multiple parameters
2023-02-27 17:53:46 -05:00
Techatrix
0f77fd5b0e
add multi object for loop support ( #1011 )
...
* run `zig fmt`
* add support for multi object for loops
* add completion tests on multi object for loops
* update minimum zig build version
* use multi object for loops in codebase
* Update tres to latest version
* fix panics when generating document scope on invalid for loops
2023-02-21 17:11:35 -05:00
Techatrix
5cb0c98db1
fix function call resolution
2023-02-11 00:04:08 +01:00
Techatrix
d98060b3d6
more closely match Zir.Inst.Ref to InternPool.Index
2023-02-10 19:10:58 +01:00
Techarix
57fc10eec0
add predefined values to Index
2023-02-08 21:01:15 +01:00
Techatrix
3c7e9e13ce
better error messages on field access
2023-01-28 19:01:49 +01:00
Techatrix
9cde2495b2
bug fixes
2023-01-28 18:54:16 +01:00
Techatrix
55364f2e2b
do not intern Structs, Enums and Unions
2023-01-28 18:02:29 +01:00
Techatrix
9131285db1
improve comptime interpreter stack trace message
2023-01-26 17:14:42 +01:00
Techatrix
ca644d67c1
Merge branch 'master' into intern-pool
2023-01-26 16:16:40 +01:00
Techatrix
fe54fb7cfa
Use new ast helper functions ( #939 )
...
* use new ast helper functions
* use new ast helper functions
* update min build version
* fix merge conflicts
2023-01-24 18:55:38 -05:00
Techatrix
b09c317ae7
bug hunting
2023-01-24 22:07:19 +01:00
Techatrix
95139e09ec
move InternPool and encoding into analyser folder
2023-01-23 22:26:56 +01:00
Techatrix
4b7a434feb
small refactor
2023-01-23 22:21:47 +01:00
Techatrix
497f1e1b23
implement field access in comptime interpreter
2023-01-23 21:29:24 +01:00
Techatrix
0817d6008b
redesign InternPool encoding
2023-01-22 21:59:30 +01:00
Techatrix
3085c3e153
implement big int
2023-01-20 22:39:19 +01:00
Techatrix
861e2ffb05
add formatting to recordError
2023-01-20 19:55:26 +01:00
Techatrix
1e73ac91e5
small comptime interpreter refactor
2023-01-20 19:28:25 +01:00
Techatrix
b4ac6142cf
correctly resolve primitive types
2023-01-20 19:20:42 +01:00
Techatrix
34b2643b33
add basic comptime interpreter tests
2023-01-20 17:06:16 +01:00
Techatrix
407f921ef8
refactor type printing
2023-01-17 20:23:27 +01:00
Techatrix
bdf207a821
small refactor on ComptimeInterpreter
2023-01-14 21:49:27 +01:00
Techatrix
d49979d002
remove arena from ComptimeInterpreter
2023-01-14 21:30:52 +01:00
Techatrix
1456bfa1c6
refactor InternPool KeyAdapter
2023-01-14 19:17:06 +01:00
Techatrix
98899ed0cf
some ComptieInterpreter work
2023-01-14 14:07:52 +01:00
Techatrix
650eaeb66c
implement anyframe->T
2023-01-06 14:38:28 +01:00
Techatrix
f0c888188a
refactor and basic struct/union value implementation
2023-01-06 14:12:29 +01:00
Techatrix
8828ff117d
more comptime interpreter work
2023-01-04 11:11:48 +01:00
Techatrix
6118686d00
fix remaining compiler errors
2022-12-27 03:02:07 +01:00
Techatrix
03e50066a1
Merge branch 'master' into intern-pool
2022-12-27 01:53:55 +01:00
Techarix
04448d1a7b
more intern pool work
2022-12-27 02:46:57 +01:00
Techatrix
68ac6f9f30
remove ast.tokenSlice()
( #824 )
2022-12-15 17:01:42 -05:00
Techarix
748cd7d6a9
Merge remote-tracking branch 'origin/master' into intern-pool
2022-12-11 19:02:24 +01:00
Auguste Rame
6ab2c68355
Allocgate 2.0 slain ( #791 )
...
* Allocgate 2.0 slain
* Tests now compile, but they fail
* Temporary bruteforce
2022-12-02 15:14:58 -05:00
Techatrix
4f180712bb
add initial intern pool implementation
2022-12-02 00:08:45 +01:00
Alexandros Naskos
56a65f42bf
Added tuple type support, fixed compilation with zig master branch ( #786 )
...
* Added tuple type support, fixed compilation with zig master branch
* Removed unneeded comment
* Bumped up minimum zig version required to build zls
2022-11-26 12:22:16 -05:00
Auguste Rame
87aa4c09e1
Quick comptime interpreter fix, place it behind an option ( #761 )
...
* Quick fix
* Add config option
2022-11-16 19:28:01 -05:00
Auguste Rame
c8dffc1f9b
Some comptime interpreter fixes
2022-11-10 20:51:02 -05:00
Auguste Rame
c803a5de3f
Quick cleanup
2022-11-09 23:46:23 -05:00
Auguste Rame
411e74d364
Add param type resolution & stop using stage2, still a bit broken :(
2022-11-09 23:17:21 -05:00
Auguste Rame
b91a193d04
We can interpret std now because of proper tree shaking!
2022-11-08 14:42:40 -05:00
Auguste Rame
c6ab7e8a0f
Casts++, compileLog, pointers
2022-11-08 14:42:40 -05:00
Auguste Rame
e6b691e447
More builtins, use stage2 because we can
2022-11-08 14:42:33 -05:00
Auguste Rame
d2e166bb0b
Some builtins, rudimentary hacky diagnostics; need to nerf global evaluation
2022-11-08 14:37:14 -05:00
Auguste Rame
599c134593
Imports, cross-boundary resolution; can import std but dies on missing builtins / lang features
2022-11-08 14:37:13 -05:00
Auguste Rame
da00751726
Field access, function calls based on function value
2022-11-08 14:37:13 -05:00
Auguste Rame
779c3c0710
Hacky mess but it works (only if your function is the first root decl tho :P)
2022-11-08 14:37:13 -05:00
Auguste Rame
06e8756849
Add struct test
2022-11-08 14:37:13 -05:00
Auguste Rame
d2640a44ac
comptime interpreter moment
2022-11-08 14:37:01 -05:00