summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
Commit message (Collapse)AuthorAgeFilesLines
* fix critical bug discovered by #11591 (#13290) [backport]Timothee Cour2020-01-291-1/+1
|
* ARC: optimize complete object constructors to use nimNewObjUninitAraq2020-01-261-10/+14
|
* Removed lib/system/allocators.nim. seqs_v2 and strs_v2 now uses ↵Ico Doornekamp2020-01-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | allocShared0. (#13190) * Cleanup, remove lib/system/allocators.nim. seqs_v2 and strs_v2 now use allocShared0 by default. * Fixed -d:useMalloc allocShared / reallocShared / deallocShared. These now use the alloc/dealloc/realloc implementation that also takes care of zeroing memory at realloc. * Removed debug printfs * Removed unpairedEnvAllocs() from tests/destructor/tnewruntime_misc * More mmdisp cleanups. The shared allocators do not need to zero memory or throw since the regular ones already do that * Introduced realloc0 and reallocShared0, these procs are now used by strs_v2 and seqs_v2. This also allowed the -d:useMalloc allocator to drop the extra header with allocation length. * Moved strs_v2/seqs_v2 'allocated' flag into 'cap' field * Added 'getAllocStats()' to get low level alloc/dealloc counters. Enable with -d:allocStats * *allocShared implementations for boehm and go allocators now depend on the proper *allocImpl procs
* Unexport even more symbols (#13214)alaviss2020-01-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * system/gc: don't export markStackAndRegisters * compiler/cgen: unexport internal symbols As these functions are Nim-specific walkaround against C's optimization schemes, they don't serve any purpose being exported. * compiler/cgen: don't export global var unless marked * compiler/ccgthreadvars: don't export threadvar unless marked * tests/dll/visibility: also check for exports This ensure that these changes don't break manual exports. * compiler/cgen: hide all variables created for constants * compiler/ccgtypes: don't export RTTI variables * compiler/ccgexprs: make all complex const static * nimbase.h: fix export for windows * compiler/cgen, ccgthreadvars: export variables correctly For C/C++ variables, `extern` means that the variable is defined in an another unit. Added a new N_LIB_EXPORT_VAR to correctly export variables.
* fixes #13195 (#13198)cooldome2020-01-201-2/+2
| | | | | | | | * fixes #13195 * extra fix * fix typo
* Revert "fixes #13195"Andrii Riabushenko2020-01-191-1/+2
| | | | This reverts commit cd7904f2b29e623998a1d32ee726d000f56fc5ce.
* revert last commitAndrii Riabushenko2020-01-191-2/+1
|
* more on arc codegen (#13178)cooldome2020-01-191-11/+44
| | | | | | | | | | | | * arc codegen for union type * add more tests * fix offsetof * fix tsizeof test * fix style
* fixes #13157Araq2020-01-171-3/+6
|
* make case-object transitions explicit, make unknownLineInfo a const, replace ↵Jasper Jenkins2020-01-171-6/+6
| | | | a few magic numbers with consts (#13170)
* Working towards arc codegen (#13153)cooldome2020-01-161-31/+39
| | | fixes #13029
* fixes #13105 (#13138)Andreas Rumpf2020-01-141-1/+1
|
* more arc features (#13098)Andreas Rumpf2020-01-101-1/+5
| | | | | * config update * ARC now supports 'repr' and 'new' with finalizers is supported
* fix enumtostr crash for enum-range (#13035)Jasper Jenkins2020-01-051-1/+1
|
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-011-2/+5
| | | | | This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior. Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
* fixes another regressionAraq2019-12-241-4/+11
|
* fixes a silly regressionAraq2019-12-241-1/+3
|
* a better bugfixAraq2019-12-241-30/+33
|
* fixes a regressionAraq2019-12-241-4/+4
|
* fixes #12826Araq2019-12-241-18/+33
|
* fixes #12899 (#12921)Andreas Rumpf2019-12-181-2/+4
| | | | | | * fixes #12899 * fixes regression: destroy global variables in reverse declaration order, closureleak test relies on it
* ARC: cycle detector (#12823)Andreas Rumpf2019-12-171-16/+26
| | | | | | | | | | | | | * first implementation of the =trace and =dispose hooks for the cycle collector * a cycle collector for ARC: progress * manual: the .acyclic pragma is a thing once again * gcbench: adaptations for --gc:arc * enable valgrind tests for the strutils tests * testament: better valgrind support * ARC refactoring: growable jumpstacks * ARC cycle detector: non-recursive algorithm * moved and renamed core/ files back to system/ * refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
* better support for PROGMEM like annotations for lets/vars; fixes #12216 (#12799)Andreas Rumpf2019-12-051-36/+40
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-300/+298
| | | | | | | | | | | | | | | | | | * 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
* conversions to unsigned numbers are not checked anymore; implements /… ↵Andreas Rumpf2019-11-201-1/+2
| | | | | | | | (#12688) [backport] * conversions to unsigned numbers are not checked anymore; implements / fixes https://github.com/nim-lang/RFCs/issues/175 * change the spec yet again to be less consistent but to make more sense; updated the changelog
* --gc:destructors: simple closures workAndreas Rumpf2019-11-021-2/+0
|
* --gc:destructors now means Nim uses pure refcounting (#12557)Andreas Rumpf2019-10-301-1/+1
|
* refactoring: use the new strings and seqs when optSeqDestructors is activeAraq2019-10-201-20/+20
|
* refactoring: --newruntime consists of 3 different switchesAraq2019-10-201-5/+5
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-11/+11
| | | | | * Remove sonsLen * Use Indexable
* fixes a critical --gc:boehm regressionAndreas Rumpf2019-09-061-1/+3
|
* allows access to .compileTime vars at runtime (#12128)Andreas Rumpf2019-09-051-0/+3
|
* fix min/max for float numbers (#12068)Arne Döring2019-09-021-6/+1
|
* gc:destructors progressAraq2019-09-011-1/+1
|
* fixes #12042 (#12083)Andreas Rumpf2019-08-291-1/+1
| | | | | | * fixes #12042 * make tests green again
* Fix to int to biggest int (#12066)Arne Döring2019-08-271-9/+1
| | | | | * fix to(Biggest)Int * kill toFloat magics as well
* fixes #10053 (#11951)Timothee Cour2019-08-151-1/+2
|
* fixes #11891Andreas Rumpf2019-08-101-0/+4
|
* int128 on firstOrd, lastOrd and lengthOrd (#11701)Arne Döring2019-08-071-1/+4
| | | | * fixes #11847
* fixes #11745Araq2019-07-191-1/+6
|
* make 'koch temp' work againAraq2019-07-141-2/+5
|
* [refactoring] moves transformation for 'spawn' into its own spawn.nim ↵Araq2019-07-141-1/+1
| | | | implementation
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-9/+9
| | | | --styleCheck:error
* Offsetof fixes (#11690)Arne Döring2019-07-091-0/+16
| | | | | | | | * first fixes * more tests and fixes * code normalization
* fixes #11671Andreas Rumpf2019-07-071-1/+1
|
* fix #11651 exportc symbol not exported, leading to link error (#11658)Timothee Cour2019-07-051-3/+2
|
* fixes #11636Araq2019-07-031-2/+5
|
* fixes #11098Andreas Rumpf2019-06-261-5/+11
|
* fixes #11563 (#11594)Andreas Rumpf2019-06-261-2/+4
|