aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/astgen.hpp
AgeCommit message (Collapse)Author
2022-12-06actually remove stage1Andrew Kelley
2021-07-28stage1: fix anon struct naming in certain casesMichael Dusan
- generic "struct:L:C" naming if rloc is NodeTypeStructValueField - generic "struct:L:C" naming if rloc is NodeTypeFnCallExpr - move some tests from test/behavior/misc to test/behavior/typename closes #4330 closes #9339
2021-07-11Rename IrInstSrc to Stage1ZirInst and IrInstGen to Stage1AirInstMartin Wickham
2021-05-28stage1: remove source_node field from Stage1ZirAndrew Kelley
This field is unneeded because we always have the source node available in the context that we have a Stage1Zir object.
2021-05-28stage1: remove c_import_buf from Stage1ZirAndrew Kelley
All we need is a boolean in Stage1AstGen. This is part of an effort to make Stage1Zir immutable.
2021-05-28stage1: move the ZigFn from Stage1Zir to Stage1AstGenAndrew Kelley
Part of an effort to make Stage1Zir immutable.
2021-05-28stage1: move some mutable state from Stage1Zir to IrAnalyzeAndrew Kelley
This is progress towards making Stage1Zir immutable, so that we can avoid generating it for every comptime function call. Also rename IrExecutableGen to Stage1Air.
2021-05-28stage1: rename IrExecutableSrc to Stage1ZirAndrew Kelley
and make IrBuilderSrc private to astgen.cpp
2021-05-28stage1: rework tokenizer to match stage2Andrew Kelley
* Extracts AstGen logic from ir.cpp into astgen.cpp. Reduces the largest file of stage1 from 33,551 lines to 25,510. * tokenizer: rework it completely to match the stage2 tokenizer logic. They can now be maintained together; when one is changed, the other can be changed in the same way. - Each token now takes up 13 bytes instead of 64 bytes. The tokenizer does not parse char literals, string literals, integer literals, etc into meaningful data. Instead, that happens during parsing or astgen. - no longer store line offsets. Error messages scan source files to find the line/column as needed (same as stage2). - main loop: instead of checking the loop, handle a null byte explicitly in the switch statements. This is a nice improvement that we may want to backport to stage2. - delete some dead tokens, artifacts of past syntax that no longer exists. * Parser: fix a TODO by parsing builtin functions as tokens rather than `@` as a separate token. This is how stage2 does it. * Remove some debugging infrastructure. These will need to be redone, if at all, as the code migrates to match stage2. - remove the ast_render code. - remove the IR debugging stuff - remove teh token printing code