Commit Graph

793 Commits

Author SHA1 Message Date
awr1
96d44fdd0a Deprecate xlen() for strings and seqs (#8782)
* deprecates xlen() for strings and seqs

* added docs
2018-08-26 17:15:19 +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
Araq
30597e643f fixes merge conflict 2018-08-23 11:30:55 +02:00
awr1
bf973d29da Fixes #8719 (onFailedAssert now works for doAssert) (#8731) 2018-08-23 10:20:58 +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
Araq
f12a5431a1 make tests green again 2018-08-21 20:33:47 +02:00
Andreas Rumpf
2def616069 exploit nil seqs for performance (#8688)
* changes $ for seqs to never produce 'nil'
* exploit the fact that empty seqs don't have to allocate in the code generator
2018-08-20 11:54:18 +02:00
Andreas Rumpf
696c0c48c7 fixes merge conflict 2018-08-19 15:14:03 +02:00
Andreas Rumpf
b2d5bfd076 changes $ for seqs to never produce 'nil' 2018-08-18 16:59:37 +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
Andreas Rumpf
27e1fbe7db implement the --nilseqs switch properly 2018-08-15 16:56:32 +02:00
Andreas Rumpf
0da91aa744 changes how the now illegal 'string == nil' comparison is detected 2018-08-15 16:31:56 +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
Araq
f91a181f58 make tests green again 2018-08-13 23:16:03 +02:00
Andreas Rumpf
dae5450947 WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
Araq
4cf1e3eb4b rename SystemError to CatchableError in order to avoid breaking Nimble and probably lots of other code 2018-08-10 15:31:53 +02:00
Andreas Rumpf
1d78ba64b4 rework the exception hierarchy; refs #8363 2018-08-10 11:40:01 +02:00
Araq
de263a43c6 deprecate isNil for strings and seqs 2018-08-08 11:21:56 +02:00
andri lim
4d5cce9882 fixes #6255, add system.ashr arithmetic right shift (#8547) 2018-08-07 18:41:30 +02:00
Oscar Nihlgård
9b9cfa7306 Stricter signature for countdown/countup (#8549) 2018-08-07 09:24:54 +02:00
Araq
7ac6462cbd make at least bootstrapping work 2018-08-05 14:17:24 +02:00
Timothee Cour
d07d148597 fixes #7492 excessiveStackTrace:on shows non-absolute file in stacktrace (#8469) 2018-07-30 07:39:58 +02:00
Hugo Locurcio
3838e2a8d7 Fix links to manual.html in the system module documentation (#8467)
The HTML anchor IDs were changed, which made those links not link
to the appropriate section anymore.
2018-07-28 12:13:37 -04:00
Andreas Rumpf
f485ebe162 --gc:destructors: next steps; WIP 2018-07-21 13:16:53 +02:00
Andreas Rumpf
4389409e26 fix merge conflict 2018-07-18 09:46:30 +02:00
Andreas Rumpf
ae09879b3a fixes #8223 2018-07-17 18:21:09 +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
LemonBoy
3163a0f466 Do not consider enums with holes as ordinals (#8264)
Make the compiler behave consistently with respect to what's written in
the manual.

Fixes #1239
2018-07-12 18:08:45 +02:00
Andreas Rumpf
5b59852406 system.substr is not implemented with compilerProcs anymore 2018-07-11 16:39:16 +02:00
Andreas Rumpf
ce01472ff3 refactorings in preparations for the new runtime 2018-07-10 10:39:53 +02:00
Timothee Cour
befca425c4 workaround issue #8223 nim doc fails with doAssertRaises (#8245) 2018-07-08 08:16:13 +02:00
Dmitry Atamanov
a6c3bbf01a Add proc toOpenArray[byte] for strings (#7820) 2018-07-07 21:03:22 +02:00
Mamy Ratsimbazafy
75ef90da82 Put back deprecation path for SomeReal
was wrongly deleted in c7298561c1
2018-07-07 15:04:41 +02:00
Araq
531013727d system.nim: minor code style change 2018-07-06 19:13:54 +02:00
Araq
5384de685f Merge branch 'devel' of github.com:nim-lang/Nim into araq-devel 2018-07-06 18:41:00 +02:00
Dominik Picheta
5e338c371e Use '\L' instead of '\n' in system for backwards compatibility.
See https://github.com/nim-lang/packages/pull/785.
2018-07-06 15:48:17 +01:00
Andreas Rumpf
683c60e2fd restore deprecated PNimrodNode in order to make the CIs happy 2018-07-05 09:17:44 +02:00
Andreas Rumpf
a9e96888d0 system.nim: cleanup the formatting 2018-06-29 11:21:57 +02:00
Andreas Rumpf
c7298561c1 system.nim: remove deprecated symbols 2018-06-28 07:42:46 +02:00
Zahary Karadjov
fb27357b62 A minimal patch enabling the new typedesc and static types syntax 2018-06-16 16:46:32 +03: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
hlaaf
7c71e1b058 Fix GC_getStatistics calling itself GC_disableMarkAndSweep in JS (again) 2018-06-06 00:39:07 +03:00
Yuriy Glukhov
395b7506cf Expose GC_setStackBottom (#7885) 2018-06-04 11:12:18 +02:00
data-man
b4626a220b Added $ for openarrays. Fixes #7940. 2018-06-01 21:28:23 +03:00
Dmitry Atamanov
94c45136ea Fixes #6832 (#7813)
Fixes #6832
2018-05-19 18:32:18 +03:00
Emery Hemingway
cda591a42f Disable setTerminate when noCppExceptions is defined (#7751) 2018-05-04 07:40:40 +02:00
Andreas Rumpf
599b5d6dcb make 'not nil' experimental 2018-05-02 13:34:53 +02:00