Commit Graph

8716 Commits

Author SHA1 Message Date
Andreas Rumpf
dcfafb3289 Merge branch 'araq-better-pure-enums' into araq-better-codegen 2017-09-22 10:15:49 +02:00
Andreas Rumpf
3936587c06 fixes #6403 2017-09-21 21:07:18 +02:00
Andreas Rumpf
1c0c9d8959 make tests green again 2017-09-21 21:07:00 +02:00
Andreas Rumpf
405b9c8a85 refactoring: TLoc knows the node it originated from; it is planned to use this to produce better C code (move optimizations) 2017-09-21 14:38:45 +02:00
Andreas Rumpf
a04c7d8b38 introduce OnHeapNew and rename TLoc.s to TLoc.storage 2017-09-21 11:38:04 +02:00
Andreas Rumpf
fd4ef6ae8f .pure enums are much more convenient to use now 2017-09-17 17:36:37 +02:00
Andreas Rumpf
ecf1424456 Merge branch 'devel' into araq 2017-09-15 21:12:59 +02:00
Andreas Rumpf
053b0ad6f3 Merge branch 'araq' of github.com:nim-lang/Nim into araq 2017-09-15 16:08:16 +02:00
Parashurama
88a5e9d88c Fix operations on string as openarray in VM. (#6257)
* fix openarray.len for string as openArray in VM.
* fix openarray[idx] for string as openArray in VM.
* fix openarray[idx]=val for string as openArray in VM.
* add tests for passing string as openArray in VM.
* fix issue with NimNode.len
NimNode.len was also returning len for string literals.
also fix logic bug in if/elif chain.
2017-09-15 13:35:57 +02:00
Andreas Rumpf
39f0195ebf Merge branch 'devel' into araq 2017-09-15 09:27:51 +02:00
Yuriy Glukhov
c3117e1aba Fixes #6336 (#6337) 2017-09-06 22:55:09 +02:00
Yuriy Glukhov
d8944b93cb Fixed handling of versions with dashes in nimble pkgs (#6335) 2017-09-06 15:02:25 +02:00
Andreas Rumpf
2ef65d5cdf C++ codgen: do not emit struct literals if not possible 2017-09-05 09:28:36 +02:00
Araq
c02159dde4 Merge branch 'devel' of github.com:nim-lang/Nim into devel 2017-09-05 01:03:45 +02:00
Araq
21e22624a2 fixes #6294 2017-09-05 01:03:23 +02:00
Zahary Karadjov
c446806f75 improve the debugging experience when line directives are used 2017-09-04 18:17:22 +03:00
Araq
2db96d4f7b make install.txt part of the zips 2017-09-04 11:22:50 +02:00
Ruslan Mustakov
31ecec6473 Allow to modify backend link template (#6173) 2017-09-03 01:09:22 +02:00
Araq
2d8e97ee03 only replace the tilde when followed by a slash; refs #6176 2017-09-03 01:08:23 +02:00
Parashurama
0861249de7 Fix seq.setLen initialisation in VM (#6224) 2017-09-02 22:53:22 +02:00
Dominik Picheta
90fa64501f Implement .nimble-link files in the compiler and add tests for them. 2017-09-02 15:28:25 +01:00
Dominik Picheta
9b465a2361 Add readme to tests. Add fileDir option to testament & create nimble test. 2017-09-02 15:03:39 +01:00
Andreas Rumpf
d456055221 fixes #6306 2017-09-01 16:30:24 +02:00
Andreas Rumpf
a08fb61da9 make tests green again 2017-08-31 13:59:25 +02:00
Andreas Rumpf
8d714d2b02 low/high/of are now overloadable operations 2017-08-30 23:14:33 +02:00
BigEpsilon
6f6e6fe4eb Fix #6295 (#6296) 2017-08-30 14:44:11 +02:00
Andreas Rumpf
920f4acadf fixes #6279 2017-08-29 00:33:46 +02:00
Paul Tan
b06c0f97a4 writeDepsFile: write included files as well
`writeDepsFile()` does not list files which were included with the
`include` statement, e.g, with:

    import file1
    include file2

`file1` will be written to the deps file, while `file2` would not.

Fix this by modifying `writeDepsFile()` to write included files as well.
Now, both `file1` and `file2` in the above example will be written to
the deps file.
2017-08-25 17:45:33 +08:00
Paul Tan
1a50442c13 Generate deps file during C compilation
The "genDepend" command was previously taught how to generate a "deps"
file in 4910a87c6 (gendepend improvements; refs #5144). Such a deps file
is useful in integrating the Nim compiler with an external build system
or watch daemon, such that it's possible to only run the Nim compiler
when any of the source files are modified.

It's also useful to generate the deps file in the nimcache directory
during C compilation, without needing to re-run the compilation passes
with "genDepend". This would thus reduce overall project build times.
2017-08-25 17:45:33 +08:00
cooldome
82453825e9 Make Nim gdb pretty print friendly (#6240) 2017-08-24 10:21:38 +02:00
Parashurama
837b77b0a1 fixes basic type alignement issue on i386 platform. (#6209) 2017-08-19 09:02:02 +02:00
Parashurama
03b11b66cf fixes mitems iterator on vm. (issue with tuple value)
this discard any implicit conversion on iterator return value.
the previous behaviour was to return a reference to a converted copy and
thus not modifying the original value.
2017-08-19 08:58:57 +02:00
Zahary Karadjov
7ad115f530 Restore the old behavior of parsing "quote do:"
close #5845
2017-08-19 08:57:43 +02:00
Zahary Karadjov
c3e5c6c326 treat var modifiers inside the concept body correctly: #1033 2017-08-19 08:57:43 +02:00
Zahary Karadjov
4483cefa0c fix #5918 2017-08-19 08:57:43 +02:00
Daniil Yarancev
5c7ae14074 Fixes #5965 (#6237) 2017-08-14 17:43:39 +02:00
Araq
6b3af6a5d7 WIP: --gc:regions instead of --gc:stack 2017-08-13 02:51:00 +02:00
Andreas Rumpf
88b65ea957 fixes #6234 2017-08-11 20:14:44 +02:00
Andreas Rumpf
dfe067a74a reorder pass: consider the 'using' statement; disabled debug output 2017-08-11 20:14:44 +02:00
Arne Döring
4c31bc1cd1 type kind is now part of the generated name for types (#6203) 2017-08-10 14:36:21 +02:00
Parashurama
4fdf7f2ea3 fix VM intsize for 32bits and smaller targetOS. (#6211)
This commit change the default behaviour of VM int/uint always being
64bits and make int/uint on VM behave identically to compiled code.

This insert 'opcNarrowU' or 'opcNarrow' opcode on Int/Uint operations
when needed to simulate smaller Int/Uint on VM.
2017-08-10 14:34:57 +02:00
Arne Döring
608cc18178 reverted genEcho 2017-08-08 13:58:50 +02:00
Arne Döring
54808ab12f don't filter '\0' characters in string generation 2017-08-07 18:21:21 +02:00
Arne Döring
3bf1f019a7 improved genEcho 2017-08-07 17:54:05 +02:00
Fredrik Høisæther Rasch
c39e202976 Introduce first class support for Android (#5772) 2017-08-06 02:18:15 +02:00
Araq
153441db1d codegen: do not produce empty loops; speeds up debug builds tremendously on Windows 2017-08-04 21:27:14 +02:00
Dominik Picheta
d60da4f8f0 Merge pull request #6165 from endragor/no-source-without-git
Do not generate Source/Edit without git in config
2017-08-03 22:56:22 +01:00
James Cowgill
fed1b0a077 Add mips64 and mips64el CPU platforms (#5866) 2017-08-03 18:37:02 +02:00
andri lim
57edf619fe fixes #6016 union alias trigger bad codegen (#6117)
* fixes #6016 union alias trigger bad codegen
* cpp test ok
* merging some test into one file
2017-08-03 11:03:47 +02:00
Parashurama
f063943d5f Vm fix zero extend proc ze/ze64 && toU32/toU16/toU8 (#5988)
* fixes ze/ze64 procs in VM.
* fixes toU8/toU16/toU32.
* add tests for ze/ze64 toU32/toU16/toU8 procs
2017-08-03 10:58:45 +02:00