Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e9127b2
adds Nim's AST to/from NIF
demotomohiro Oct 23, 2025
25ca7cc
encodes/decodes itemId.module
demotomohiro Oct 27, 2025
5eeede3
uses PSym.item and PType.item as id in NIF
demotomohiro Oct 27, 2025
51eccea
saves/loads PSym guard, bitsize and alignment
demotomohiro Oct 28, 2025
8a4d921
saves/loads PNode and PSym line info
demotomohiro Oct 29, 2025
6f237be
saves/loads symbol magic, options and offset
demotomohiro Oct 29, 2025
b50c453
adds procedure test code and fix bugs
demotomohiro Oct 29, 2025
3ceb223
adds more procedure test code
demotomohiro Oct 29, 2025
10885d4
adds statements test code
demotomohiro Oct 29, 2025
6a74316
fixes assertion defect when encoding empty object type definition
demotomohiro Oct 29, 2025
467a279
adds pragma test code
demotomohiro Oct 30, 2025
66d7a8e
adds generics test code and fixes bug
demotomohiro Oct 30, 2025
3c599ed
adds expression test code
demotomohiro Oct 30, 2025
91db9ac
uses ItemId instead of PSym or PType for the set of decoded syms and …
demotomohiro Oct 30, 2025
9f73412
saves/loads float Inf, NaN and NegInf literals
demotomohiro Oct 31, 2025
f3178e4
saves/loads flags of nkIdent node
demotomohiro Nov 1, 2025
5f3be1e
makes tencode_node2node.nim faster
demotomohiro Nov 1, 2025
ab13900
saves/loads PSym.ast, constraint and instantiatedFrom
demotomohiro Nov 1, 2025
54aa552
refers imported symbols like Nimony
demotomohiro Nov 4, 2025
43ff7b1
loads modules imported by system module and create module sym before …
demotomohiro Nov 5, 2025
116c220
fixes #25263; provides a new switch `mangle:nim/cpp` for debug name m…
ringabout Nov 6, 2025
155b06a
Add `heaptrack` support (#25257)
arnetheduck Nov 6, 2025
6d3254a
fixes #25251; SIGBUS with iterator over const Table lookup - prematur…
ringabout Nov 7, 2025
a866bf2
VM: optimize 'return' slots; saves millions of node allocations for N…
Araq Nov 7, 2025
6a2f4d2
wip
Araq Nov 7, 2025
dc2fb81
Merge branch 'devel' into demotomohiro-add-ast2nif2
Araq Nov 7, 2025
b4c942c
wip
Araq Nov 7, 2025
e6a1c14
progress
Araq Nov 7, 2025
940ce87
prepare for dependency tracking
Araq Nov 8, 2025
0bf8bbf
progress
Araq Nov 8, 2025
e173a6a
added TLoc writing
Araq Nov 8, 2025
2cb1c53
wip
Araq Nov 8, 2025
44f3dcc
wip
Araq Nov 8, 2025
cf4ac37
progress
Araq Nov 9, 2025
7cb0676
progress
Araq Nov 9, 2025
a9bc213
progress
Araq Nov 9, 2025
eb53434
make CI happy
Araq Nov 9, 2025
908c4e4
progress
Araq Nov 9, 2025
1ab4f1f
make explicit
Araq Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion compiler/ast.nim
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,15 @@ type

PScope* = ref TScope

ItemState* = enum
Complete # completely in memory
Partial # partially in memory

PLib* = ref TLib
TSym* {.acyclic.} = object # Keep in sync with PackedSym
itemId*: ItemId
# proc and type instantiations are cached in the generic symbol
state*: ItemState
case kind*: TSymKind
of routineKinds:
#procInstCache*: seq[PInstantiation]
Expand Down Expand Up @@ -770,6 +775,7 @@ type
# Keep in sync with PackedType
itemId*: ItemId
kind*: TTypeKind # kind of type
state*: ItemState
callConv*: TCallingConvention # for procs
flags*: TTypeFlags # flags of the type
sons: TTypeSeq # base types, etc.
Expand All @@ -786,7 +792,7 @@ type
sym*: PSym # types have the sym associated with them
# it is used for converting types to strings
size*: BiggestInt # the size of the type in bytes
# -1 means that the size is unkwown
# -1 means that the size is unknown
align*: int16 # the type's alignment requirements
paddingAtEnd*: int16 #
loc*: TLoc
Expand Down
Loading
Loading