Araq
400b4e4e0e
improve the generated code size for --gc:regions
2019-01-23 22:03:15 +01:00
alaviss
35d96d8749
compiler/sem*: better lineinfo for templates ( #10428 )
...
* compiler/sem*: better lineinfo for templates
Lineinfo for templates is inconsistant across the compiler, for example:
doAssert true
^ ^
a[int](10)
^^ ^
The `^` marks where the compiler thinks the template starts.
For qualified call, we got the same situation with `proc`s before #10427 :
system.once
^
Generics lineinfo within template declaration is also incorrect, for
example, this is where the compiler believes the `T` in `[T]` is:
template a[T](b: T)
^
This PR addresses all of these problems.
* nimsuggest: add tests for template highlighting
2019-01-23 16:35:34 +01:00
Tomohiro
bad5ad6dc7
Fix issue #10358 ( #10383 )
...
* Fix bug: vccexe finds oldest VCC
* echo path to vcvarsall.bat as hint when failed to execute cl.exe
2019-01-23 15:02:26 +01:00
narimiran
c60bb94647
update gitignore [ci skip]
2019-01-23 13:30:32 +01:00
Vindaar
d9ee377517
fix #10339 by returning type attached to nkEmpty ( #10370 )
...
* fix #10339 by checking for nkObjConstr
* revert check for nkObjConstr, return type from nkEmpty node
The correct type needed in `semObjConstr` to fix #10339 is indeed
available, but attached to an `nkEmpty` node. These were previously
discarded in `semTypeNode`, which is used to extract the type for the
object.
* simplify return of PType from `nkEmpty`
* also fixes #9866 , add test case
2019-01-23 11:17:32 +01:00
Ico Doornekamp
efa4b9adaa
Fixes #10263 ; [backport]
2019-01-23 11:13:44 +01:00
Federico Ceratto
c3229dc1c3
Add packaging guide #5182 ( #10384 )
2019-01-23 11:12:46 +01:00
LemonBoy
9c0e5c4c07
Harmonize the var/let and const handling ( #10410 )
...
Fixes #10333
2019-01-23 11:10:51 +01:00
Ico Doornekamp
7fcf51248b
Added --docInternal option to allow 'nim doc' to include non-exported symbols
2019-01-23 11:09:26 +01:00
Andreas Rumpf
2655f242a8
use the lastRead analysis; it's correct by construction, not a mess of special cases and seems to be just as fast as the old algorithm
2019-01-23 11:08:51 +01:00
Andreas Rumpf
112f7e650a
destroyer.nim: code cleanup
2019-01-23 11:08:51 +01:00
Andreas Rumpf
1b0372c6e9
make tests green again
2019-01-23 11:08:51 +01:00
Andreas Rumpf
11022fea1b
control flow graphs: introduce 'join' points for easy analyses based on abstract interpretation
2019-01-23 11:08:51 +01:00
alaviss
2fb8b1d132
nimsuggest/tester: disable highlight tests for epc ( #10426 )
...
The EPC backend of nimsuggest currently doesn't support nimsuggest
highlighter, see nim-lang/nim-mode#140
2019-01-23 09:43:11 +01:00
alaviss
e962be8981
compiler/sem*: improve lineinfo for qualified and generic procs ( #10427 )
...
Previously the compiler will believe these are where `newSeq` symbol
starts:
newSeq[int]()
^
system.newSeq[int]()
^
This commit moves them back to:
newSeq[int]()
^
system.newSeq[int]()
^
2019-01-23 09:24:21 +01:00
narimiran
f1a841c605
remove tdont_be_stupid, fixes #10386
2019-01-23 09:19:42 +01:00
Ico Doornekamp
0d480bfe22
Added basic bit manipulation procs to bitops ( #10338 )
2019-01-23 09:16:14 +01:00
Vindaar
36e34d9aed
close #3899 by adding test case ( #10424 )
2019-01-23 08:44:19 +01:00
LemonBoy
eee9729f53
Fix semantic analysis with noReturn proc in tail pos ( #10422 )
...
Fixes #10417
2019-01-23 07:30:49 +01:00
Ray Imber
94f6a6b294
Fix for issue #10342 . better message for generic subclass instantiation ( #10354 )
...
* Fix for issue #10342 . better message for generic subclass instantiation errors.
2019-01-22 17:05:26 -08:00
pgkos
a0c07ef863
Fix wrong integer types in odbcsql and db_odbc ( #10419 )
...
* Fix wrong parameter type in SQLErr
* Fix wrong types of integers passed to SQLGetData
2019-01-22 22:39:53 +01:00
LemonBoy
53eda40d40
Restore compatibility with old vcc versions [backport] ( #10415 )
...
Local variables are declared before anything else.
Fixes #10352
2019-01-22 22:38:52 +01:00
Miran
0ebfcd4c0f
Remove deprecated modules (asyncio, sockets, ftpclient) ( #10401 )
2019-01-22 16:06:44 +01:00
Federico Ceratto
54fecdb8df
Enable log folding in Travis CI ( #10414 )
...
Prevent log truncation in browsers
2019-01-22 15:50:50 +01:00
Jjp137
a6a014a859
better docs: parseopt ( #10398 )
2019-01-22 14:52:43 +01:00
Araq
458c827077
make --define:noSignalHandler compile again
2019-01-22 11:45:45 +01:00
Araq
ced62f3307
compiler interface: don't overdocument the on|off switches
2019-01-22 11:45:45 +01:00
LemonBoy
6825430831
Restrict ptr/ref to ptr/ref implicit conversion ( #10411 )
...
* Restrict ptr/ref to ptr/ref implicit conversion
Fixes #10409
* Make the ptr conversions explicit in db_odbc
2019-01-22 11:17:20 +01:00
Miran
39e1cd2bf6
Better docs for sets and intsets ( #10362 )
...
* better docs: sets
* better docs: intsets
2019-01-22 10:18:12 +01:00
LemonBoy
792dbed57e
Restore the docstring during the .async. transform ( #10404 ) [backport]
...
Fixes #9816
2019-01-22 09:41:11 +01:00
Neelesh Chandola
226c15499f
Fix compileTime pragma applying to whole var/let section ( #10389 )
2019-01-22 07:55:11 +01:00
LemonBoy
44c04b3571
Object downconversion in VM should not copy ( #10378 )
...
Hopefully the type-check phase already rejected all the invalid
conversions by the time we execute the VM bytecode.
Problem reported by chrisheller on the Nim Forum
2019-01-22 07:36:40 +01:00
LemonBoy
3ea099bc7f
Finalizer proc must be global ( #10388 )
...
Fixes #10376
2019-01-22 07:35:52 +01:00
LemonBoy
7a3f382517
Fix corner case of checked div/mod on x86 ( #10406 )
...
Fixes #10377
2019-01-22 07:33:27 +01:00
Miran
a0e8d4a93f
Gdb reload ( #10408 )
...
* gdb pretty printer survive reload
* precise printer injection
2019-01-22 06:25:11 +01:00
genotrance
4b1e227531
Fix gorge caching ( #10407 )
2019-01-22 06:24:45 +01:00
LemonBoy
ee89ba6bdb
Fix subtype conversion w/ varargs arguments ( #10402 )
...
The type matching is done on the `T` of the `varargs[T]` so the
conversion must be performed to `T` and not to the whole type.
This problem is only noticeable with the cpp backend since C doesn't
give a damn shit about your fucking (wrong) types.
Fixes #9845
2019-01-21 19:12:17 +01:00
Arne Döring
b4d329d69f
precise printer injection
2019-01-21 17:38:17 +01:00
LemonBoy
ae5d8fbd9d
Proper check for tyStatic[T] -> U conversions ( #10382 )
...
Drop the outer tyStatic shell then perform the check.
Fixes #7609
2019-01-21 17:27:36 +01:00
Oscar Nihlgård
a4cdd25b19
Support system.reset in vm ( #10400 )
2019-01-21 17:00:33 +01:00
alaviss
413755fd45
Correct lineinfo for accent quoted symbols in proc definition ( #10399 )
...
* compiler/parser: preserve lineinfo for accent quoted symbols
Previously the lineinfo for symbol $$$ in this example is:
proc `$$$`
^
After this commit:
proc `$$$`
^
* compiler/semstmts: correct lineinfo for accent quoted idents
Previously nimsuggest would highlight this as:
proc `$$$`
^~~
After this commit:
proc `$$$`
^~~
* nimsuggest/tests: add a test for accent quoted proc
Disabled by default
2019-01-21 16:57:48 +01:00
Miran
4bea8dd674
better docs for lists and deques ( #10390 )
...
* better docs: lists
* better docs: deques
2019-01-21 15:22:53 +01:00
Oscar Nihlgård
9a003bae06
Fix error lexer error messages for to large numbers ( #10394 )
2019-01-21 15:14:38 +01:00
Arne Döring
ea0c1811c5
gdb pretty printer survive reload
2019-01-21 14:22:16 +01:00
Neelesh Chandola
5491f40d54
fix vccexe not using correct path for detecting vcvarsall ( #10364 )
2019-01-21 10:05:23 +01:00
Timothee Cour
32a90f7406
fix json bug []= misplaced ( #10397 )
2019-01-21 08:24:06 +01:00
Kobi
28b3c8d74d
prevent index out of bounds error in oserr.nim
2019-01-19 10:56:36 -08:00
Federico Ceratto
095eaacf21
Fix spelling errors ( #10379 )
2019-01-19 16:01:27 +01:00
Thomas T. Jarløv
bfeade9791
better docs: uri ( #10373 )
2019-01-19 15:31:14 +01:00
Thomas T. Jarløv
4a04470450
better docs: sha1 ( #10374 )
2019-01-19 15:24:39 +01:00