Andreas Rumpf
177129195f
Merge pull request #2671 from rbehrends/fix-register-scan
...
Fix GC scanning of registers on x86_64 architectures.
2015-05-25 00:55:39 +02:00
Göran Krampe
0fc53151ba
Tweaked to do commas properly
2015-05-20 12:48:38 +02:00
Göran Krampe
2cceaff88a
Fixes #2749 , traverse full inheritance for reprRecord
2015-05-20 11:59:02 +02:00
def
fef21e9003
Use -d:builtinOverflow for builtin overflow checks
...
of recent Clang and GCC >= 5.0.
Maybe it's better that it's optional after all. GCC's code with builtin
overflow checks seems to be a bit slower actually, while Clang's is 3
times faster.
2015-05-08 04:00:24 +02:00
Reimer Behrends
2a08bbdf31
Fix GC scanning of registers on x86_64 architectures.
...
It is possible for jmp_buf to not be word-aligned or addresses
in the register dump to not be word-aligned. This can result in
either addresses in registers being missed or even addresses on
the stack past the register area not being scanned properly.
2015-05-07 14:35:39 +02:00
def
c5db4fc3a2
Move the noreturn pragma to sysFatal
...
Now you can choose to implement sysFatal with --os:standalone so that it
returns.
2015-05-05 20:26:54 +02:00
def
0e8e574961
Use builtin overflow functions of Clang and GCC (WIP, RFC)
...
This only works with recent Clang and GCC 5.0.
Currently it doesn't work because __has_builtin can't be defined.
This is totally ugly. But we can't reliably detect whether we can use
the builtins from Nim, especially with cross-compiling where the user
may be using an older compiler version. Switching this on/off manually
with a define seems weird as well, this should work automatically.
2015-05-03 03:49:11 +02:00
Araq
c6398d408d
fixes #1888
2015-04-27 23:11:59 +02:00
Wink Saville
b0b3a2500a
The importc for atomicCompareExchange is incorrectly defined.
...
The .importc: was referring to __atomic_compare_exchange_n this corrects
it to be __atomic_compare_exchange.
2015-04-13 20:39:01 -07:00
Araq
8ddb58aecc
fixes bootstrapping on windows
2015-04-10 14:17:07 +02:00
Andreas Rumpf
6e6c6446a4
Merge pull request #2329 from def-/readline
...
Speed up readLine by using getc_unlocked
2015-04-10 14:02:22 +02:00
def
22b4e4c2f2
Use more Natural and Positive numbers in proc parameters
...
- Didn't go through all modules, only the main ones I thought of
- Building the compiler and tests still work
2015-04-06 02:24:17 +02:00
Simon Hafner
6ce53e3d63
some better sysassert messages
2015-04-04 17:05:18 -05:00
def
450c2c5287
Fix proc call in gc_ms
...
This fixes compilation with --gc:markandsweep -d:gcUseBitvectors
2015-03-26 01:12:45 +01:00
def
ddeefe85d2
Add cpuRelax assembler for other platforms
2015-03-21 21:02:09 +01:00
Andreas Rumpf
327b56d5e1
Merge pull request #2343 from philip-wernersbach/fix-pthreads-under-cpp
...
Fix issues with pthread_create when compiling under C++ mode.
2015-03-16 10:27:55 +01:00
Dominik Picheta
1e9ab3bb0a
Fixes #2323 . Fixes #2148 .
2015-03-15 22:06:26 +00:00
Philip Wernersbach
f8d6d74368
Fix pthread_create binding when compiling in C++ mode.
...
C++ has different rules for void pointers, which causes the binding
to be invalid when compiling in C++ mode.
2015-03-15 17:33:46 -04:00
def
ef9a3b4d3b
Speed up readLine by using getc_unlocked
...
- Only on POSIX and Windows (_fgetc_nolock here) systems
- File is locked to our thread before and unlocked after readLine
- About 3 times faster in some simple tests
2015-03-12 22:46:18 +01:00
def
aa7e7ee270
Make readFile work with FIFO files
2015-03-12 21:17:39 +01:00
def
573fa9b891
Clean up GCs a bit
2015-03-10 15:31:55 +01:00
Araq
0032912d10
fixed the tester; more tests green
2015-03-10 12:32:48 +01:00
Araq
ee57bb3e3e
fixes --gc:none regression; made some tests green
2015-03-10 12:32:47 +01:00
Araq
c40aac8e20
GC: get rid of pathological behaviour for stack marking
2015-03-08 13:08:19 +01:00
def
20426e77e9
Fix copyStrLast to set the trailing \0 char
2015-03-04 03:37:50 +01:00
def
d875951124
sizeof(char) is always 1
2015-03-04 03:22:06 +01:00
def
0264b42216
Also deepCopy strings only up to their length, not capacity
2015-03-04 03:21:17 +01:00
def
f5968c7946
Only zero strings when necessary.
...
This removes the zeroing when the string is subsequently overwritten by
a memcpy anyway.
2015-03-04 01:48:09 +01:00
def
fa3620be9e
Only copy strings to their size, not capacity
...
Capacity may be much bigger, so we end up with strings that are much
larger than they have to be and have to copy more as well.
2015-03-03 22:23:35 +01:00
Andreas Rumpf
8b05bf3e86
Merge pull request #2238 from oderwat/fix-2228-readall-osx
...
Fix for readAll(stdin) problem on OS X and better anyway. I can confirm this works on Windows.
2015-03-01 23:30:02 +01:00
Araq
24ae0c387f
some love for the testsuite; fixed regressions
2015-03-01 21:41:21 +01:00
Hans Raaf
79ad73574c
Fix for readAll(stdin) problem on OS X and better anyway.
2015-03-01 03:35:20 +01:00
Araq
3dd1ecbae4
fixes #2074
2015-02-26 02:05:23 +01:00
Araq
f4a0400de2
fixes #2199 , fixes #2197
2015-02-24 19:19:08 +01:00
GrundleTrundle
2abf3b717a
Removed int64 -> int downcast in timers.-
...
On windows when compiling on 32 bit, this can get you a
out of range exception for an otherwise valid interval.
2015-02-21 15:18:34 -05:00
Araq
c90a13bb41
fixes #2124
2015-02-20 12:25:58 +01:00
def
ecfaab68f1
Make readBytes and writeBytes work with uint8
...
So far only openarray[int8] worked. Now it's openarray[int8|uint8]. This
should make sense, since uint8 is comfortable to represent a byte
(0-255) and there is already type byte* = uint8 in system.
2015-02-18 21:13:01 +01:00
Andreas Rumpf
13c2d9b8e2
Merge pull request #2150 from def-/gc2-compiling
...
Make gc2 compile again and fix some deprecation warnings
2015-02-16 20:33:25 +01:00
def
b9abeff617
Clean up some more deprecation warnings
2015-02-16 19:13:49 +01:00
def
a5d22a9534
Make gc2 compile again
2015-02-16 19:12:09 +01:00
Federico Ceratto
657dca5c3b
Fix typos
2015-02-15 16:20:32 +00:00
Federico Ceratto
c95f6f117a
Fix typos
2015-02-15 16:06:06 +00:00
Hans Raaf
55ab6cc2b3
Disable -pthread for linker on OSX
...
The -pthread is not needed on Darwin/OS X and the Apple compilers give a
warning about this if you use --threads:on with the Nim compiler.
2015-02-13 01:51:46 +01:00
Araq
10335fd726
fixed minor bugs; cleaned up tests
2015-02-12 14:56:56 +01:00
Andreas Rumpf
f7195becac
Merge pull request #2053 from reactormonk/message-for-koch-temp
...
report how to create a compiler stacktrace #1280
2015-02-12 09:40:31 +01:00
Araq
eec18896b7
cleaned up GC tests; fixes object variant re-assign bug
2015-02-10 20:19:47 +01:00
Araq
683b82a2ec
fixes #2070
2015-02-10 20:19:44 +01:00
Araq
e84834db79
lots of C++ codegen improvements
2015-02-07 10:48:07 +01:00
Araq
e75e421912
C++ support: codegen generates C++'s references and avoids copies
2015-02-04 00:52:45 +01:00
Simon Hafner
fc5700619b
report how to create a compiler stacktrace #1280
2015-02-01 23:39:10 -06:00