| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
* user defined integer literals; refs #17020
* updated renderer.nim
* use mlexerutils helper
* imported all test cases from https://github.com/nim-lang/Nim/pull/17020
* final grammar updated
|
|
|
|
|
| |
- use `doAssert` in t17433
- use setGenericParamsMisc in semTemplateDef akin to semProcAux
- pragma handling in semTemplateDef inline with semProcAux
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* simplified proc-like name ident to symbol code
* wip - reworking generic param sem
* wip - closer to removing nkEmpty generic params
* it's hacky but tests pass
* slowly tweaking semProcAux to take on semLambda
* fix pragma superset check proto vs current
* Set the symbol owner earlier
* partial progress reworking proto
found bug where default values between forward and impl lead to overload
resolution issues.
* simplified pragma handling and callConv checks
Co-authored-by: Clyybber <Clyybber@users.noreply.github.com>
* partially working
* cgexprs issue
* It works!
* comment clean-up
* clean-up asserts, comments, and other bits
* add isGenericParams, inline isGeneric queries
* seeing if this is sufficiently consistent
* can use this approach or continue it in a further PR
* commentary about nullary generics and clean-ups
* fixed a mistake in PNode isGenericRoutine
* Some small cleanups
* Small cleanup
* for func lambdas ensure we use lambda pragmas
* add some basic compileTime func tests
* [ci skip] remove comments
Co-authored-by: Clyybber <Clyybber@users.noreply.github.com>
Co-authored-by: Clyybber <darkmine956@gmail.com>
|
|
|
|
|
| |
* fixes #11225; generic sandwich problems; [backport:1.2]
* progress
* delegating these symbols must be done via 'bind'
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes #15210 [backport:1.2]
* make tests green
* make ordinal work
* makes Swapable test compile
* make Indexable example work
* concepts: 'self' is now 'Self'
* concepts: make Dictionary example compile
* document the new concept implementation
* concepts: make typeDesc work properly
* concepts: allow documentation comments (d'oh)
|
|
|
|
|
| |
* rename case statement macro from match to `case`
* fix test
|
|
|
|
|
|
|
|
| |
* minor improvements
* IC: added the required logic for compilerProcs
* LazySym ftw
* we need this testing logic
* reimplement the old way we use for module package creation
* fixes a regression; don't pick module names if you can avoid it
|
|
|
|
|
|
|
|
|
| |
* cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors
* simplify nimNoNilSeqs2
* simplify nimNoNilSeqs
* fixup
|
|
|
|
|
|
|
|
| |
* removed dead code
* we need even more laziness for the generic caches
* make it bootstrap on older Nims
* wrote more deserialization code
* IC: replay required methods information
|
|
|
|
|
|
|
|
|
|
|
| |
* IC: dead code elimination pass
* preparations for a different codegen strategy
* added documentation to the newly written code
* IC: backend code
* IC: backend adjustments
* optimized the compiler a bit
* IC: yet another massive refactoring
* fixes regressions
* cleanups
|
|
|
|
|
|
|
|
|
|
|
| |
* code cleanups
* refactorings for IC
* more refactorings for IC
* IC: attach the 'nil' type to its module
* IC: refactorings and improvements
* IC: progress
* IC: more serialization fixes
* IC: embarrassing omission
* code cleanups
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* fix #16110
* refs #16110
* fix comment
* Trigger build
* use shallowCopy for efficiency
|
| |
|
|
|
|
| |
This reverts commit 2bab2a2cd8476423414819db3ad79309f6033e13.
|
| |
|
|
|
|
|
|
|
| |
* fix #15972
* add testcase
* more
|
|
|
|
| |
* "eg" is a misspelled "egg", "e.g." is "exempli gratia"
* Also, "ie" is "i.e.".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make `requiresInit` pragma to work for distinct types in addition to
objects. Tagging of distinct types with `requiresInit` pragma was
already supported, but its impact wasn't applied. Now its behavior when
applied on distinct types is as follows.
Given the following distinct type definitions:
```nim
type
DistinctObject {.requiresInit, borrow: `.`.} = distinct MyObject
DistinctString {.requiresInit.} = distinct string
```
The following code blocks will fail to compile:
```nim
var foo: DistinctFoo
foo.x = "test"
doAssert foo.x == "test"
```
```nim
var s: DistinctString
s = "test"
doAssert s == "test"
```
But these ones will compile successfully:
```nim
let foo = DistinctFoo(Foo(x: "test"))
doAssert foo.x == "test"
```
```nim
let s = "test"
doAssert s == "test"
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
| |
* Assign hook name changed to `=copy`
* Adapt destructors.rst
* [nobackport] Duplicate tests for =copy hook
* Fix tests
* added a changelog entry
Co-authored-by: Clyybber <darkmine956@gmail.com>
|
|
|
|
|
| |
* suggest: try to find the implementation of a symbol when def is used
* suggest: return all declarations of the symbol on `def`
|
|
|
|
|
|
|
|
|
| |
* implements https://github.com/nim-lang/RFCs/issues/258
* don't be too strict with custom pragma blocks
* cast pragmas: documentation
* added most missing inference query procs to effecttraits.nim
|
|
|
|
|
|
|
|
|
| |
* allow result symbol reuse
* try different approach
* Revert "try different approach"
This reverts commit abcfb6b75983c2f798cc887342ff1a9ff10c0324.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix forward declarations in shadow scope contexts
* Add testcase for #15385
* Less empty lines
* Fix tests
* Inline isShadowScope
* Add original testcase (with reduced amount of iterations)
* Add testcase without forward decl
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* refactoring: move procs to typeallowed.nim
* frontend preparations for first class openArray support
* prepare the code generator for first class openArray
* code generation for first class openArray; WIP
* code generation for open arrays, progress
* added isViewType proc
* preparations for borrow checking
* added borrow checking to the front end
|
| |
|
|
|
|
|
| |
* don't raise index defects on malformed ast
* style
|
|
|
|
|
|
|
|
| |
* Fix #5691
* Cleanup and thoughts
* Use scope approach
* Seperate defined/declared/declaredInScope magics
* Fix declaredInScope
* Update spec accordingly
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix forward declaration issues in template/macro context
* Correct forward declaration resolving for overloads
* Remove old dead code
* WIP consistent gensym ids
* Minimize diff
* Remove obsoleted hack
* Add templInstCounter to give unique IDs to template instantiations
* Remove obsoleted code
* Eh, init in myOpen, not myProcess...
* Remove optNimV019
* Add testcase for #13484
|
|
|
|
|
|
|
| |
* fixes the regressions
* closes #13936
* scope based memory management implemented
* enabled tcontrolflow.nim test case
* final cleanups
|
|
|
|
| |
* Clean out old Deprecated CLI switch
* Update to remove --oldast CLI option
|
|
|
|
|
|
|
| |
* Make unreachable code a warning
* Adapt test
* Trigger CI
|
|
|
|
|
|
|
|
|
|
|
| |
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
|
| |
|
|
|
|
|
|
| |
(#13261)
* disallow typedesc in arrays and move previous checks to types.typeAllowedAux
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Allow let to not have value when using importc
This allows a let statement with the `{.importc.}` pragma to not be
initialised with a value. This allows us to declare C constants as Nim
lets without putting the value in the Nim code (which can lead to
errors, and requires us to go looking for the value). Fixes #14253
* Proper fix and documentation + changelog entry
* Improve testcase with one from timotheecour
* Add test to verify it working with macros
|
| |
|
|
|
|
|
| |
* Fix #14019 by making trailing else a warning
* Rename to UnreachableElse
|
| |
|
|
|
|
| |
* fixes #12741
* updated tests
|
|
|
| |
Co-authored-by: cooldome <ariabushenko@bk.ru>
|
|
|
|
|
|
|
|
|
| |
The new mechanism can deal with more complex scenarios such as
not nil field appearing in a non-default case object branch or
a field within a generic object that may depend on a when branch.
The commit also plugs another hole: the user is no longer able
to create illegal default values through seq.setLen(N).
|
| |
|