summary refs log tree commit diff stats
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* make goto based exceptions available for 'nim cpp' (#13244)Andreas Rumpf2020-01-258-12/+19
| | | | | * make goto based exceptions available for 'nim cpp' * optimize seq.add to be comparable to C++'s emplace_back
* nim dump: add libpath (#13249)Timothee Cour2020-01-241-0/+1
|
* Removed lib/system/allocators.nim. seqs_v2 and strs_v2 now uses ↵Ico Doornekamp2020-01-233-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 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-234-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* kochdocs: use a glob instead of hardcoded list; generate docs for compiler/; ↵Timothee Cour2020-01-232-3/+3
| | | | | | | bugfixes (#13221) * kochdocs: use a glob instead of hardcoded list; generate docs for compiler/; bugfixes * fixup after #13212 isRelativeTo got merged
* VM: allow overriding MaxLoopIterations without rebuilding nim (#13233)Timothee Cour2020-01-234-9/+11
|
* fix range[enum] type conversion (#13204) [backport]Jasper Jenkins2020-01-201-2/+3
|
* compiler/ccgtypes: hide exportc proc unless it has dynlib (#13199)alaviss2020-01-201-1/+1
| | | | | This hides most of stdlib's internal functions from resulting binaries/libraries, where they aren't needed on *nix. Static libraries are not affected by this change (visibility doesn't apply to them).
* fixes #13195 (#13198)cooldome2020-01-202-4/+5
| | | | | | | | * fixes #13195 * extra fix * fix typo
* fixes #13110 (#13197)Andreas Rumpf2020-01-192-2/+11
|
* Revert "fixes #13195"Andrii Riabushenko2020-01-192-4/+4
| | | | This reverts commit cd7904f2b29e623998a1d32ee726d000f56fc5ce.
* revert last commitAndrii Riabushenko2020-01-192-4/+4
|
* Fixes #13186 (#13188)slangmgh2020-01-191-2/+4
|
* more on arc codegen (#13178)cooldome2020-01-192-18/+51
| | | | | | | | | | | | * arc codegen for union type * add more tests * fix offsetof * fix tsizeof test * fix style
* fixes #13144 (#13145)Timothee Cour2020-01-181-9/+4
| | | | * fixup: genscript now does not copy nimbase.h but uses -I$nim/lib
* fixes #13157Araq2020-01-171-3/+6
|
* Fix docs for subdirs too (#13180)Clyybber2020-01-171-11/+15
| | | | | * Fix doc subdirs * Extract to helper proc, and fix on windows
* make sink operator optional (#13068)cooldome2020-01-172-48/+42
| | | | | | | | | | | | | | | | * make sink operator optional * bug fix, add changelog entry * Trigger build * fix one regression * fix test * Trigger build * fix typos
* ARC works for async on Windows (#13179)Andreas Rumpf2020-01-171-2/+2
|
* make case-object transitions explicit, make unknownLineInfo a const, replace ↵Jasper Jenkins2020-01-1732-201/+183
| | | | a few magic numbers with consts (#13170)
* fixes #13095 (#13181)cooldome2020-01-171-0/+3
| | | | | | * fixes #13095 * fix typo
* Cleanup DFA (#13173)Clyybber2020-01-162-36/+16
|
* fixes #12998 nim doc regression (#13117)Timothee Cour2020-01-164-3/+14
|
* Working towards arc codegen (#13153)cooldome2020-01-161-31/+39
| | | fixes #13029
* ARC: misc bugfixes (#13156)Andreas Rumpf2020-01-153-25/+87
| | | | | | | | * fixes #13102 * closes #13149 * ARC: fixes a move optimizer bug (there are more left regarding array and tuple indexing) * proper fix; fixes #12957 * fixes yet another case object '=' code generation problem
* successX now correctly shows html output for `nim doc`, `nim jsondoc`; fix ↵Timothee Cour2020-01-155-6/+18
| | | | | | | | #13121 (#13116) * successX now correctly shows html output for nim doc * fixes #13121 * fixup hintSuccessX to be less weird
* Added 'ansic' os support for minimal (embedded) targets (#13088)Ico Doornekamp2020-01-151-1/+5
| | | | | | | | * os:any implementation * os:asny: omit flock/funlock calls in echoBinSafe * Disabled default "unhandled expection" reporting for `--os:any` to reduce code size. Added unhandledExceptionHook instead which can be used to get a notification from Nim and handle it from the application.
* fixes #9674 [backport] (#13143)Andreas Rumpf2020-01-141-1/+12
|
* fixes #13104 [backport] (#13142)Andreas Rumpf2020-01-141-0/+1
|
* pass platform argument only if vccexe is used (#13078)cooldome2020-01-141-10/+9
| | | | | * pass platform only if vccexe is used * fixes #12297
* fixes #10665 (#13141) [backport]Andreas Rumpf2020-01-141-22/+26
|
* fixes #13105 (#13138)Andreas Rumpf2020-01-141-1/+1
|
* fixes #13119 (#13128)Andreas Rumpf2020-01-143-3/+11
| | | | | * fixes #13119 * fixes a regression
* fixes #13100 nim doc now treats `export localSymbol` correctly (#13123) ↵Timothee Cour2020-01-132-14/+26
| | | | | | | [backport] * fix #13100 nim doc now treats `export localSymbol` correctly * use owner instead
* fixes #13112 (#13127)Andreas Rumpf2020-01-132-2/+18
| | | | | | * improve line error information * fixes #13112
* fixes #13122 (#13126)Andreas Rumpf2020-01-132-5/+5
| | | | | | * fixes #13122 * moved tests to where they belong
* fix rtti sizeof for varargs in global scope (#13125) [backport]Jasper Jenkins2020-01-131-2/+2
|
* more arc features (#13098)Andreas Rumpf2020-01-104-1/+38
| | | | | * config update * ARC now supports 'repr' and 'new' with finalizers is supported
* fixes #13072; no test case because it will be added later with more ↵Araq2020-01-101-1/+1
| | | | exception handling related bugfixes
* remove all remaining warnings when build nim (with -d:nimHasLibFFI) (#13084)Timothee Cour2020-01-093-14/+7
| | | | | | * cleanup deprecations in evalffi + elsewhere * remove dead code getOrdValue64
* fix crash due to errant symbols in nim.cfg (#13073) [backport]Andy Davidoff2020-01-081-2/+3
|
* make SuccessX show project file + output file (#13043)Timothee Cour2020-01-083-11/+22
| | | | | | | * make SuccessX show project file + output file * address comments * fix test and add `result.err = reNimcCrash` otherwise hard to see where reNimcCrash used * address comments
* distinctBase type trait for distinct types (#13031)cooldome2020-01-081-0/+16
|
* [easy] --hint:link:on now shows link cmd instead of nothing (#13056)Timothee Cour2020-01-072-3/+2
| | | | | | * --hint:link:on now shows link cmd instead of nothing * update doc for --listCmd
* --styleCheck:hint now works (#13055)Timothee Cour2020-01-071-1/+1
|
* Continue #13002 (#13021)Clyybber2020-01-061-37/+81
|
* Allow `-o` option for `buildIndex` (#13037) [backport]BinHong Lee2020-01-051-1/+4
| | | | | Addressing #12771 This is also included in the docgen documentation [here](https://nim-lang.org/docs/docgen.html) but its not respected as reported in the issue.
* fixes #13013, reverts previous changes to readLines() (#13036) [backport]cooldome2020-01-051-1/+1
| | | | | | | * Revert "remove default argument for readLines (#12807) [backport]" This reverts commit c949b81efdeb08b38224e1678ad140b7b7663b15.
* fix enumtostr crash for enum-range (#13035)Jasper Jenkins2020-01-051-1/+1
|
* VM: support importc var, ptr/pointer types, cast int <=> ptr/pointer (#12877)Timothee Cour2020-01-057-35/+199
| | | | | | | | | | | | | | * 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