Commit Graph

29 Commits

Author SHA1 Message Date
Luna 0265eddb2e hashmap changes 2020-07-23 16:56:37 -03:00
Luna 56be677c7a at() -> items[] 2020-07-23 16:46:46 -03:00
Luna e0f0ae7f24 toSlice -> items 2020-07-23 16:42:59 -03:00
Luna 03561ebe6a zig fmt pass 2020-07-23 16:42:49 -03:00
Luna 74e6beda67 more fixes for latest zig 2020-04-01 21:58:30 -03:00
Luna 049a388660 more fixes for latest zig 2020-04-01 21:48:08 -03:00
Luna 5ae47fb962 zig fmt pass 2020-04-01 16:09:52 -03:00
Luna 7976b64cf6 tuple-inator pass 2020-04-01 16:09:39 -03:00
Luna e42a97e192 use 'as' builtin
- move src/codegen.zig to src/codegen/llvm.zig
2019-11-25 21:42:24 -03:00
Luna c743c804be analysis: check current_scope being null for VarDecl 2019-10-12 13:56:39 -03:00
Luna 192baf0725 analysis: remove 'else', replace by dedicated Block
It isn't possible to make Blocks at root scope. the parser does not
allow such constructions, however, it is still a Node, and it should be
handled accordingly.
2019-10-05 10:40:36 -03:00
Luna 9d1c9cab7f analysis: fix ret type 2019-10-05 10:33:37 -03:00
Luna d69a64dbfb analysis: add bump-dump scope to loop analysis 2019-10-05 10:30:01 -03:00
Luna 881833b187 s/TypeSolver/Analyzer 2019-10-05 10:27:38 -03:00
Luna 5c58ac0238 analysis: add contextual checks for Assign expr 2019-10-05 10:26:47 -03:00
Luna 5d8efd657f analysis: add analysis of Assign expressions 2019-09-28 22:48:59 -03:00
Luna f2520e7d02 change bits and pieces everywhere about var meta 2019-09-28 22:16:33 -03:00
Luna a95d0e7fd8 comp_ctx: make resolveVarType's return type be nullable
- add a parameter to prevent unwanted side-effects of resolveVarType
 - add basics of resolving scope variables
2019-09-28 21:30:52 -03:00
Luna c7920246a5 codegen: add emitting of unary exprs 2019-09-28 17:58:17 -03:00
Luna a136a377ce change symbol table to use pointers to heap allocated symbols 2019-09-28 13:17:11 -03:00
Luna d235ce0d13 add codegen for allocating vardecls onto stack (not init yet)
codegen pass needs type information about the variable. thankfully,
analyze pass already did the hard work for it, and scope info has types
of all its declared names. we use that info to generate the alloca

to have information about which current scope we are, we add a "child
index" to scopes so we can repoint current context at them instead of
bumpScope(), which always creates new, empty ones.

initializer exprs are next
2019-09-27 22:36:35 -03:00
Luna 7def9abc5a add "variable metadata"
this is inserted in the analysis pass into a map from expr ptrs to
metadata in the compilation context itself, this enables codegen to
fetch that metadata with the expr pointer

the other approach was embedding it into the variable expr itself (as
seen by VariableExpr), but that causes a compiler crash
2019-09-27 17:08:01 -03:00
Luna 362fc7e3ef analysis: add name type resolution
this only adds resolution for the types. for the actual metadata, such
as e.g parameters, that isn't available, so codegen isn't helped by
this.
2019-09-27 15:12:30 -03:00
Luna 4346636cfa analysis: add check for call expr's arguments 2019-09-27 14:31:59 -03:00
Luna 3f94082477 analyze: make VarDecl statements insert symbols to current scope 2019-09-27 14:07:42 -03:00
Luna 466243fc2b add checking of numeric types around boolean operators 2019-09-27 13:49:53 -03:00
Luna 7e41d03eb9 add proper Integer32 and Integer64 literals 2019-09-27 12:07:20 -03:00
Luna 76d888bde8 analysis: create err ctx buffer on init()
- do better error message for resolveGlobalType
2019-09-27 10:47:34 -03:00
Luna c3d3486163 rename types.zig to analysis.zig 2019-09-27 00:00:06 -03:00
Renamed from src/types.zig (Browse further)