Commit Graph

1061 Commits

Author SHA1 Message Date
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
Dominik Picheta
5ea3b4d581 Implements alloc/dealloc counters for better leak debugging. (#8384) 2018-07-21 01:43:13 +02:00
Andreas Rumpf
4389409e26 fix merge conflict 2018-07-18 09:46:30 +02:00
Andreas Rumpf
32afdc09c6 WIP: strings/seqs based on destructors 2018-07-17 13:19:42 +02:00
Andreas Rumpf
74bf316619 more progress on destructor based strings 2018-07-13 21:15:47 +02:00
Yuriy Glukhov
dfe3f16022 Don't depend on string.h in codegen (#8299) 2018-07-13 17:41:59 +02:00
Andreas Rumpf
5b59852406 system.substr is not implemented with compilerProcs anymore 2018-07-11 16:39:16 +02:00
Andreas Rumpf
16d8fab310 mmdisp: code cleanups 2018-07-11 16:38:13 +02:00
Andreas Rumpf
8f0c9b2fdd string comparisons don't have to know the strings representation 2018-07-10 11:37:30 +02:00
Andreas Rumpf
ce01472ff3 refactorings in preparations for the new runtime 2018-07-10 10:39:53 +02:00
Araq
5384de685f Merge branch 'devel' of github.com:nim-lang/Nim into araq-devel 2018-07-06 18:41:00 +02:00
Joey
a1457bfa9f Rewrite the memory management code for Nintendo Switch (#8169)
Rewrite the memory management code for Nintendo Switch

The first implementation was naive and did not account for multiple
memory allocations. However, this implementation may still be
incomplete. Currently, when running applications, the code runs fine.
When the application is exited via code (the end of the program is
reached or quit() is called), the Switch will crash. Not sure why this
happens, but I suspect it is from Nim memory allocations.

I suspect the memory allocations because when I compile the helloworld
application without any Nim allocations (just C function calls) and use
`--gc:none` as a compile option, the application exits fine.
2018-07-05 16:33:15 +02:00
Andreas Rumpf
67c7e49e2a gc_common: minor reformating 2018-07-01 15:10:18 +02:00
Andreas Rumpf
b5a96d28c7 codgen refactoring: prepare for alternative string/seq implementations 2018-06-29 11:34:39 +02:00
Joey
559a7615ad Nintendo switch support (#8069)
* Add config section for Nintendo Switch
* Add compiler configuration for Nintendo Switch and it's CPU
* Add specific lib code for Nintendo Switch
* Add GC support for Nintendo Switch
* Update changelog for Nintendo Switch
* Update changelog with more info about fixed paths
* Cleaned up GC memory management a bit
* Relocate docs for Switch
* Rename aarch64NoneElfGcc to nintendoSwitchGCC
* Remove armv8a57
* Fix installer.ini
* Reuse code in linux and amd64
* Add posix defs for nintendo switch
* Add more defined sections for nintendo switch
* Remove old comment
* Add what's not supported for Nintendo Switch docs
* Make nintendoswitch == posix
* Remove DEVKITPRO references from nim.cfg
* Make PR extccomp changes
* Remove Result type alias
* Add separate switch consts file
* Update docs for nintendo switch
* Fix travis errors with undefined consts and add correct wait.h procs
2018-06-27 12:35:09 +02:00
Zahary Karadjov
7ab1aafc6b stdlib work 2018-06-16 16:46:32 +03:00
Charles Blake
ed4f1f4c43 hotfix 3221ac0943 broke gc:regions/aka gc:stack by
underallocating for sequences of any type larger than 1 byte.  This does the
necessary multiply to restore basic functionality.
2018-06-13 10:36:47 -04:00
Andreas Rumpf
61d9292095 fixes merge conflict 2018-06-11 01:25:48 +02:00
Andreas Rumpf
e00e7fec54 Merge pull request #7873 from ehmry/GenodeEnv
Native access to Genode environment
2018-06-09 09:38:53 +02:00
Araq
8e9551b1c7 fixex merge conflicts 2018-06-08 19:50:36 +02:00
Araq
3c7bbfebb1 fixes seq copying in channels for --gc:regions 2018-06-07 21:35:41 +02:00
Emery Hemingway
22f714585b Native access to Genode environment
Add a 'GenodeEnv' type and a 'componentConstructHook' to the system
module. The 'componentConstructHook' allows for detection of POSIX style
programs that exit implicitly or native Genode components that
initialize to serve RPC requests and OS signals.

This hook takes a 'GenodeEnv' argument so that the environment interface
is passed cleanly to application code after globals are initialized.
This is an typed pointer to a C++ object, procedures for accessing the
environment will be available from a Nimble library and not included in
the standard library.

The standard library has an internal pointer to the environment object
but this is not for external use, the undocumented global environment
pointer has been removed.
2018-06-07 07:21:20 +02:00