Commit Graph

1082 Commits

Author SHA1 Message Date
Araq
5c25b93898 change system.nim to adhere to the style guide 2018-10-30 15:03:28 +01:00
cooldome
dfb8730f51 Implements #9434. Minimal Stacktrace for Exceptions in release mode (#9480)
* Fixes #9434
2018-10-28 13:40:42 +01:00
recloser
2b03bed2db Fix printing and comparing uninitialized strings 2018-10-21 21:18:10 +02:00
Vindaar
e190f485ae fixes #9456 by only calling c_fclose if non nil 2018-10-20 20:35:04 +02:00
Timothee Cour
7d8e281239 [nimscript] document currentSourcePath in thisDir (#9402) 2018-10-18 12:18:40 +02:00
Yuriy Glukhov
dc72cf7564 No setjump in GC for emscripten/wasm (#9386) 2018-10-17 00:46:13 +02:00
LemonBoy
72cd3b7914 Fix repr() for UncheckedArray (#9385) 2018-10-16 14:27:42 +02:00
LemonBoy
71636059e9 Avoid memory allocation during dynlib loading (#9320)
By using `write` instead of `rawWrite` we'd end up asking the compiler
to generate the GC dynlib _while_ we were already generating another
dynlib!

Fixes #9123
2018-10-12 08:56:14 +02:00
Ștefan Talpalaru
10f5f67767 gogc: GCC-8.2.0 compatibility and other improvements (#9211)
- Go's write barriers are now plugged-in in all the relevant points
- "gcGo" is correctly classified by usesWriteBarrier()
- some gogc structures and functions now use golib wrappers to keep GCC
  version-specific conditions out of the compiler/stdlib code
- we no longer allow mixing the C malloc with Go's
- fix a problem with string copying
2018-10-11 22:15:17 +02:00
Solitude
027a11d7c8 Add procs to retrieve project name, directory and full path to nimscript (#9274) 2018-10-11 09:56:12 +02:00
LemonBoy
334032294f Fix linking issue in cpp codegen
Declare the root symbol only once and have the other modules depending
on it emit an `extern` declaration.

Fixes #9013
2018-09-19 12:46:50 +02:00
skilchen
e317745098 don't reuse code from 0.18.0 2018-09-15 14:05:42 +02:00
skilchen
9fa477de75 more efficient fix for #8961 2018-09-15 01:04:23 +02:00
Andreas Rumpf
0c04b80651 Merge pull request #8966 from LemonBoy/fix-8964
Fix hashing for codegenProc (sic) types
2018-09-14 22:28:12 +02:00
Araq
5709736e82 Merge branch 'devel' into araq-better-docgen 2018-09-14 15:48:07 +02:00
LemonBoy
839953c3e1 Fix hashing for codegenProc (sic) types
Since the name mangling is inhibited we should take the user-supplied
name during the sighash computation.

Fixes #8964
2018-09-14 15:37:51 +02:00
Araq
4ab9953787 fixes #8961 2018-09-14 11:40:43 +02:00
LemonBoy
e7d4043406 Always emit hti object types if needed (#8940)
The compiler is now smart enough to emit types only if needed without
all the importc tricks. This also fixes a codegen bug where, if all the
stars align correctly, typeinfo doesn't include any definition of
`TNimType` but uses it.

Found by @skilchen in #8938
2018-09-11 17:03:21 +02:00
LemonBoy
9ba80d2044 JS strings have no trailing zero anymore (#8936) 2018-09-11 11:45:02 +02:00
alaviss
198e34ec1d system/excpt: nil is no longer vaild for seqs (#8825) 2018-08-31 11:24:01 +02:00
Dominik Picheta
9ad17091cc Allow Nimble to override the `task` template in nimscript. (#8798) 2018-08-28 23:05:46 +02:00
Timothee Cour
3a626179ee doAssert, assert now print full path of failing line on error (#8555) 2018-08-25 21:48:37 +02:00
Timothee Cour
56de4c81b2 fixes #8739; allow --hint:foo:on --warning:bar:off (#8757) 2018-08-25 07:55:05 +02:00
Araq
27f488e5d9 make more tests green; system.repr does not produce 'nil' for strings and seqs anymore 2018-08-22 15:37:57 +02:00
Araq
7896903fd0 make tio test green again 2018-08-22 13:15:19 +02:00
Araq
64517445ea even more strict isNil handling for strings/seqs in order to detect bugs 2018-08-22 12:35:46 +02:00
Andreas Rumpf
696c0c48c7 fixes merge conflict 2018-08-19 15:14:03 +02:00
Emery Hemingway
2da0341b4d Genode fixes (#8501)
* Genode fixes

- wrap strings in "Genode::Cstring" when logging
- define SIGABRT for Genode
- disable GCC -fstack-protector
- use log RPC for fatal messages
- add --os:genode build to appveyor
- define paramStr and paramCount

* Select fixups for Genode POSIX
2018-08-16 18:12:37 +02:00
Andreas Rumpf
e4c759fbff Merge branch 'devel' into araq-misc 2018-08-16 01:22:21 +02:00
alaviss
7ef268274f Haiku support for Nim (#8542)
* posix_other: Haiku now has spawn.h

This is added per https://dev.haiku-os.org/ticket/13446

* posix_other: Add Haiku specific Dirent members

* cpuinfo: Add an implementation for Haiku

* distros: Add basic Haiku support

* encodings: update Haiku support

* fenv, math: Haiku now provides libm

* times: Add Haiku struct members

* ansi_c, osalloc: Add Haiku constants

* threads: Add Haiku support

* testament: Haiku uses LIBRARY_PATH

* nim.cfg: Update Haiku support

libnetwork should only be linked if network functions are used

* threads: Haiku does not support -pthread switch

* tworkingdir: Haiku's env is in /bin

* posix_other: add SIGKILLTHR for Haiku

* sockets: link with libnetwork on Haiku

* coro: correct ucontext.h location

http://pubs.opengroup.org/onlinepubs/009696699/basedefs/ucontext.h.html

* coro: ucontext backend is not available on Haiku

Haiku doesn't provide the <ucontext.h> header, as it was removed from POSIX

* coro: fix setjmp backend

The compiler does not allow statements after a noreturn function

* nativesockets: Haiku doesn't support AI_V4MAPPED

* system: hostOS can contains "haiku"

* os: add support for Haiku's packagefs

packagefs is read-only, but there are writable holes to the underlying
file system as well

* os: update constant for Haiku
2018-08-14 09:35:07 +02:00
Andreas Rumpf
7f49364fd0 make more tests green 2018-08-13 12:29:03 +02:00
Andreas Rumpf
404de2f23e Merge branch 'devel' into araq-misc 2018-08-10 12:06:16 +02:00
Grant
98225ca207 Update channels.nim (#8583)
Fix typo in channels.nim
2018-08-09 09:40:21 +02:00
Araq
babd31360a fixes more nil string bugs 2018-08-08 18:22:48 +02:00
Araq
05121d84b3 fixes a long standing nil bug in substr 2018-08-08 12:05:29 +02:00
Emery Hemingway
be4816f509 Iterator over heap instances (#8548)
Provide "dumpHeapInstances" for iterating over type statistics
of heaps. This can be used to present structured heap information
as an alternative to "dumpNumberOfInstances".
2018-08-07 08:48:52 +02:00
Araq
7ac6462cbd make at least bootstrapping work 2018-08-05 14:17:24 +02:00
Andreas Rumpf
c57e320c94 fixes 7833 (#8533)
* fixes #7833; still to-do: fix setLen
* make tests green again
* also fixes setLen and string concats; refs #7833
* change formating to avoid a compiler warning
* emit the write barrier also for addChar
* fixes yet another regression
* make setLengthStr compile for the old version
* make growobjcrash complete earlier
2018-08-05 11:42:38 +02:00
Christopher Dunn
cc1fd50b27 Try to let memTracker compile (#8502) 2018-08-05 09:53:10 +02:00
Andreas Rumpf
abe0725ab1 WIP: nothing works 2018-08-05 09:38:14 +02:00
Araq
c9f2c16da1 make setLengthStr compile for the old version 2018-08-04 23:23:10 +02:00
Araq
a18e40fa5f Merge branch 'devel' into araq-fixes-7833 2018-08-04 20:11:25 +02:00
Araq
25b4d26e22 fixes yet another regression 2018-08-04 18:50:44 +02:00
Araq
e6738ba9d9 make 'echo' threadsafe on Windows; fixes #8511 2018-08-04 18:11:03 +02:00
Araq
9235f7a3b3 Merge branch 'devel' into araq-fixes-7833 2018-08-04 15:52:34 +02:00
Araq
1c80619ac5 WIP: avoid using the old growObj in order to fix the newly introduced seq leaks 2018-08-03 18:30:45 +02:00
jcosborn
8f4c5a8955 fixed #7894 (#8496)
make system tests run properly
2018-08-01 10:57:35 +02:00
Araq
53566f7165 fixes #7833; still to-do: fix setLen 2018-07-30 23:27:01 +02:00
Yuriy Glukhov
6b40114f21 Added c_abort to ansi_c (#8449) 2018-07-30 11:10:51 +02:00
Andreas Rumpf
f485ebe162 --gc:destructors: next steps; WIP 2018-07-21 13:16:53 +02:00