Commit Graph

28 Commits

Author SHA1 Message Date
Andreas Rumpf
6c4c60eade Adds support for custom ASTs in the Nim parser (#23417) 2024-03-18 20:27:00 +01:00
Andreas Rumpf
db603237c6 Types: Refactorings; step 1 (#23055) 2023-12-12 16:54:50 +01:00
Andreas Rumpf
02be027e9b IC: progress and refactorings (#22961) 2023-11-20 21:12:13 +01:00
Andreas Rumpf
20b011de19 refactoring in preparation for better, simpler name mangling that wor… (#21667)
* refactoring in preparation for better, simpler name mangling that works with IC flawlessly

* use new disamb field

* see if this makes tests green

* make tests green again
2023-04-24 06:52:37 +02:00
ringabout
25c6491b65 fixes #20162; locals doesn't work with ORC [backport] (#20163)
fixes #20162; locals doesn't work with ORC
2022-08-23 09:00:23 +02:00
Andreas Rumpf
796498525a IC: next steps (#16550)
* cleanups
* ast.nim: cleanups
* IC: no more sym.tab field, stored externally in the module graph
* nimble compiles again
* rodfiles: store bitwidth of integers and the endianness in the cookie because we serialize 'int' directly
* rodfiles: added compilerproc and export sections
* rodfiles: added all the missing sections
* rodfiles: track the missing information
* IC: architecture for lazy loading of proc bodies
* make tests green again
* completed the lazy loading of proc bodies
* symbol lookup integration, part 1
* symbol lookup integration, part 2
* symbol lookup integration, part 3
* make tcompilerapi work again
* rodfiles: fixed config change handling
2021-01-07 20:26:40 +01:00
Andreas Rumpf
73a8b950cb big steps torwards an efficient, simple IC implementation (#16543)
* reworked ID handling
* the packed AST now has its own ID mechanism
* basic serialization code works
* extract rodfiles to its own module
* rodfiles: store and compare configs
* rodfiles: store dependencies
* store config at the end
* precise dependency tracking
* dependency tracking for rodfiles
* completed loading of PSym, PType, etc
* removed dead code
* bugfix: do not realloc seqs when taking addr into an element
* make IC opt-in for now
* makes tcompilerapi green again
* final cleanups

Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
2021-01-02 07:30:39 +01:00
Andreas Rumpf
979148e863 refactorings to prepare the compiler for IC (#15935)
* added ic specific Nim code; WIP
* make the symbol import mechanism lazy; WIP
* ensure that modules can be imported multiple times
* ambiguity checking
* handle converters and TR macros properly
* make 'enum' test category green again
* special logic for semi-pure enums
* makes nimsuggest tests green again
* fixes nimdata
* makes nimpy green again
* makes more important packages work
2020-12-17 08:01:36 +01:00
Andreas Rumpf
226595515c explicit ID generation for easier IC (#15559)
* refactoring: idents don't need inheritance
* refactoring: adding an IdGenerator (part 1)
* refactoring: adding an IdGenerator (part 2)
* refactoring: adding an IdGenerator (part 3)
* refactoring: adding an IdGenerator (part 4)
* refactoring: adding an IdGenerator (part 5)
* refactoring: adding an IdGenerator (part 5)
* IdGenerator must be a ref type; hello world works again
* make bootstrapping work again
* progress: add back the 'exactReplica' ideas
* added back the missing exactReplica hacks
* make tcompilerapi work again
* make important packages green
* attempt to fix the build for 32 bit machines (probably need a better solution here)
2020-10-25 08:50:47 +01:00
Clyybber
7e747d11c6 Cosmetic compiler cleanup (#12718)
* Cleanup compiler code base

* Unify add calls

* Unify len invocations

* Unify range operators

* Fix oversight

* Remove {.procvar.} pragma

* initCandidate -> newCandidate where reasonable

* Unify safeLen calls
2019-11-28 17:13:04 +01:00
Andreas Rumpf
fbb2763204 fixes #11958 (#12013) 2019-08-23 18:58:55 +02:00
Araq
07d465ca42 [refactoring] remove unused imports in the compiler and in some stdlib modules 2019-07-18 00:36:03 +02:00
Arne Döring
b92fd30282 rename tyExpr/tyStmt to tyUntyped/tyTyped (#11227) 2019-05-11 10:11:08 +02:00
LemonBoy
e07ab06f0a Fix locals() interaction with generic types
Follow the same logic as semTupleFieldsConstr and only skip skVar since
we're gonna add a nkDefer anyway.

Fixes #8985
2018-09-21 22:35:54 +02:00
Araq
113b530a52 cleanup import paths 2018-09-21 00:34:45 +02:00
Andreas Rumpf
61fb83ecbb baby steps for incremental compilation 2018-05-30 23:50:34 +02:00
Andreas Rumpf
ae1f6895fa active.nim: fixes the import path so that compilation with --noNimblePath works 2018-05-29 00:55:31 +02:00
Andreas Rumpf
a325692fb2 refactoring: fewer global variables 2018-05-27 19:19:12 +02:00
Araq
2a7fc84c86 remove ast.emptyNode global; cleanup configuration.nim 2018-05-16 03:06:07 +02:00
Andreas Rumpf
05724645f8 more modules compile again 2018-05-12 11:58:44 +02:00
Andreas Rumpf
1aa359febb warn about inconsistent spacing around binary operators; fixes #7582 2018-05-05 14:58:33 +02:00
Araq
19ed4a8e3e fixes #7522 2018-04-06 13:56:15 +02:00
Andreas Rumpf
46efaf294b big compiler refactoring; avoid globals for multi method dispatcher generation 2017-02-22 16:27:52 +01:00
Andreas Rumpf
5c0ffa6613 fixes #3622 2015-12-04 23:43:03 +01:00
Araq
217e0ab6e9 lambda lifting support for iterToProc plugin 2015-12-01 00:53:30 +01:00
Araq
5de900b456 added iterToProc plugin 2015-12-01 00:53:30 +01:00
Dominik Picheta
2d9a24f3f6 Hopefully fixes nimsuggest building against the compiler package. 2015-06-04 23:07:57 +01:00
Araq
0c947f31ba system.locals is now a plugin for education 2015-04-24 02:08:06 +02:00