summary refs log tree commit diff stats
path: root/compiler/cgen.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes #13436 (#13615)Andreas Rumpf2020-03-101-3/+9
|
* make goto based exceptions available for 'nim cpp' (#13244)Andreas Rumpf2020-01-251-1/+1
| | | | | * make goto based exceptions available for 'nim cpp' * optimize seq.add to be comparable to C++'s emplace_back
* Unexport even more symbols (#13214)alaviss2020-01-231-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* make case-object transitions explicit, make unknownLineInfo a const, replace ↵Jasper Jenkins2020-01-171-1/+1
| | | | a few magic numbers with consts (#13170)
* VM: support importc var, ptr/pointer types, cast int <=> ptr/pointer (#12877)Timothee Cour2020-01-051-1/+1
| | | | | | | | | | | | | | * VM: allow certain hardcoded special var variables at CT * VM: allow all importc var, cast[int](ptr) * fix tests tests/vm/tstaticprintseq.nim, tests/cpp/t8241.nim * VM: == works for ptr/pointer nodes * bugfix: ==, cast now also works for pointer, not just ptr * VM supports cast PtrLikeKinds <=> PtrLikeKinds / int * improve cname handling * fixup + bug fix * VM: support cast from ref to int * address comment: opcLdGlobalDeref => opcLdGlobalDerefFFI * defensive check against typ == nil
* fixes #12978 (#13012)Andreas Rumpf2020-01-031-4/+6
|
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-011-30/+24
| | | | | 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.
* minor refactoringsAndreas Rumpf2019-12-271-4/+4
|
* a better bugfixAraq2019-12-241-3/+3
|
* fixes #12826Araq2019-12-241-19/+34
|
* fixes #12899 (#12921)Andreas Rumpf2019-12-181-2/+2
| | | | | | * fixes #12899 * fixes regression: destroy global variables in reverse declaration order, closureleak test relies on it
* completes #12799, fixes #12216 (#12870)Andreas Rumpf2019-12-101-0/+1
|
* fixes #12827 (#12829) [backport]cooldome2019-12-101-4/+5
|
* ARC related bugfixes and refactorings (#12781)Andreas Rumpf2019-12-051-1/+1
|
* better support for PROGMEM like annotations for lets/vars; fixes #12216 (#12799)Andreas Rumpf2019-12-051-5/+15
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-186/+185
| | | | | | | | | | | | | | | | | | * 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
* fixes and changes the recently introduced 'alignas' to be 'align' (#12666)Andreas Rumpf2019-11-151-5/+5
| | | | | | * fixes and changes the recently introduced 'alignas' to be 'align' * more improvements
* ARC: solves phase ordering problems (#12654)Andreas Rumpf2019-11-141-4/+11
|
* implemented alignas pragma (#12643)Arne Döring2019-11-131-1/+7
| | | | | | | | | | | | * implemented alignas pragma * fix bootstrap * generate c++ compatible syntax for alignas * Make it work. * Multiple alignof expressions. Implement top level alignof.
* fix #12426 (#12462)Arne Döring2019-10-201-2/+3
|
* refactoring: use the new strings and seqs when optSeqDestructors is activeAraq2019-10-201-5/+5
|
* refactoring: --newruntime consists of 3 different switchesAraq2019-10-201-1/+1
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-4/+4
|
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-1/+1
| | | | | * Remove sonsLen * Use Indexable
* exportc now mangles same as importc, fixes #10578 (#12144)Timothee Cour2019-09-061-1/+2
| | | | | | | * fixes #10578 * add tests * add changelog * add {.exportcpp.}
* Remove ENDB (#12095)Clyybber2019-08-311-42/+3
|
* - adding _actual as a suffix only for calls to an actual proc and not ↵Viktor Kirilov2019-08-231-1/+6
| | | | | | through a global function pointer - fixes https://github.com/nim-lang/Nim/issues/11996 (#12007) - adding forward declarations for reloadable functions within a module - fix compilation errors when 2 such functions reference each other - fixes https://github.com/nim-lang/Nim/issues/11608 - preserve permissions of copied executable binaries
* removed unused imports [refactoring]Andreas Rumpf2019-08-081-1/+1
|
* Incremental compilation (IC): Improvements (#11881)Andreas Rumpf2019-08-081-55/+60
| | | | | | | | | | | | | | | | | | | * IC: C codegen is aware of IC * manual: minor change to make VSCode's RST plugin render it properly * IC: minor refactoring * testament: code refactorings * rodutils: removed dead code * IC: always build the compiler with the IC feature * IC: C codegen improvements * IC: implement the undocumented -d:nimMustCache option for testing purposes * IC: added first basic tests * IC: extensive testing of the deserialization feature * testament: refactoring; better IC tests * IC: removes 'nimMustCache' flag; readonly does the same * testament: minor refactoring * update Nimble version * testament: removed dead code and imports; IC: added simple test * IC: progress
* int128 on firstOrd, lastOrd and lengthOrd (#11701)Arne Döring2019-08-071-0/+3
| | | | * fixes #11847
* IC: some progressAndreas Rumpf2019-07-271-1/+2
|
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-2/+2
|
* [refactoring] moves transformation for 'spawn' into its own spawn.nim ↵Araq2019-07-141-1/+1
| | | | implementation
* there is only one style -- my styleAraq2019-07-101-12/+12
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-14/+14
| | | | --styleCheck:error
* fixes #11563 (#11594)Andreas Rumpf2019-06-261-1/+1
|
* fixes #10299 (#11324)Andreas Rumpf2019-05-251-3/+3
|
* fixes #11309 (#11310)Andreas Rumpf2019-05-231-0/+10
|
* fixes #10963, disallow implicit mixing of strings and ints/floats (#11292)Miran2019-05-211-1/+1
|
* fixes #11202Andreas Rumpf2019-05-141-5/+8
|
* fixes #11194 (#11242)Arne Döring2019-05-141-3/+2
|
* Fix destructor injections for global variables (#11230)Clyybber2019-05-131-0/+3
| | | | | | | | * attach global destructors at end of mainModule * Add testcase * Minor cleanup * Inject topLevelVar temporaries' destructors early * Fix megatest
* Replace countup(x, y) with x .. yClyybber2019-05-071-3/+3
|
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-2/+2
|
* revert discardable transformation (#10905)Andreas Rumpf2019-04-211-0/+9
| | | | | | | | | | * Revert "Properly wrap discarded statements (#10322)" This reverts commit 15584879b91e14565156ca140eef1dc100cf34c4. * add test for implicit discard after defer * enable t10241 again * make C++ tests green again
* fewer ropes (#11037)Arne Döring2019-04-191-6/+6
|
* Less ropes (#10979)Arne Döring2019-04-111-104/+177
| | | | | * convert ropecg to a macro * fewer intermediate ropes
* more efficient enumToStr implementation that works without the old typeinfo ↵Andreas Rumpf2019-04-071-1/+4
| | | | structures
* fixes #10943 (#10947)cooldome2019-04-051-1/+4
|
* fixes #10942. Lent T bug (#10946)cooldome2019-04-031-7/+7
| | | | | | | | * fixes #10942 * add test * bug build