Andreas Rumpf
6fc90ab1c2
macros.nim: minor comment change
2019-02-08 16:09:22 +01:00
LemonBoy
26255c72fd
Fix getCustomPragmaVal on var fields
2019-02-06 11:34:55 +01:00
Andreas Rumpf
57b49cc509
allocators: add a name field for easier debugging
2019-02-04 21:06:23 +01:00
Andreas Rumpf
dee8e6e98a
gc: destructors is beginning to work ( #10483 )
...
* kochdocs.nim: code cleanup
* docgen: nicer indentation
* parser.nim: code cleanup
* fixes #10458
* make tests green again
* make =destroy mixins
* gc:destructors: produced C code is almost working
* --gc:destructors simple program compiles (but leaks memory)
* gc:destructors make examples compile in C++ mode
* destructors: string implementation bugfixes
* strs.nim: minor code cleanup
* destructors: builtin seqs are beginning to work
* remove debugging helpers
2019-01-29 15:12:16 +01:00
Ico Doornekamp
f11f36e7d5
Fixed getCustomPragmaVal to allow multiple fields in custom annotations ( #10289 )
2019-01-18 09:04:12 +01:00
Ico Doornekamp
7e7603ed2b
Documented error source argument of macros.error() ( #10279 )
2019-01-12 08:17:20 +01:00
Araq
647066e378
make the stdlib work with the changed docgen
2019-01-11 22:17:43 +01:00
jcosborn
044cef152f
add custom pragma support for var and let symbols ( #9582 )
...
* add custom pragma support for var and let symbols
* updated changelog for custom pragmas on var and let symbols
* add oldast switch for backwards compatibility
2019-01-07 12:36:06 +01:00
Andreas Rumpf
3300c8a500
much simpler implementation of constant tuple declarations
2018-12-19 11:11:33 +01:00
Neelesh Chandola
8e90ed0618
Const tuple unpacking ( #9964 )
...
* tuple unpacking is now supported for consts
* Move nkConstTuple to the end of TNodeKind
* Add nnkConstTuple in macros.nim
* Fix Formatting
2018-12-19 10:52:41 +01:00
Andreas Rumpf
e3a668a33b
--gc:destructors: baby steps
2018-12-15 13:54:41 +01:00
Araq
24106ade8f
hotfix: discriminants can be of size 8 bytes [backport]
2018-12-05 09:43:59 +01:00
Andreas Rumpf
350396e1ca
gc:destructors: more progress
2018-11-29 20:10:52 +01:00
Andreas Rumpf
7d82df20be
gc:destructors further progress
2018-11-29 01:13:32 +01:00
Andreas Rumpf
8990764709
some progress on --gc:destructors
2018-11-27 00:36:29 +01:00
Andreas Rumpf
413580bc04
new minor language feature: .noSideEffect blocks like .gcsafe blocks
2018-11-27 00:36:29 +01:00
cooldome
086676782a
Add isInstanceOf for generic procs to the macros module ( #9730 )
2018-11-21 21:30:03 +01:00
Araq
3f6168b337
removes deprecated T/P types
2018-11-16 13:27:56 +01:00
Araq
4bd9f32f33
--gc:destructors: hello world example compiles and runs
2018-11-16 00:13:49 +01:00
Lolo Iccl
37d88e5168
Add proc [](n: NimNode, s: HSlice[T, U]): seq[NimNode] to macros ( #7735 )
...
fixes #7670 .
2018-11-10 14:10:50 +01:00
Arne Döring
573d02760e
newLit works on enum ( #9662 )
...
* newLit works on enum
* remove debugging echo
2018-11-09 12:15:00 +01:00
Andreas Rumpf
24902394f7
VM: don't inject destructor calls, refs #7041
2018-11-06 19:36:39 +01:00
B3liever
fb75e3bb49
Fix names set and get procs in macros
2018-10-30 15:42:48 +02:00
Kaushal Modi
f8cef575b3
Improve dumpLisp macro ( #9515 )
...
* Improve dumpLisp macro
- Remove commas from the lisp representation of the AST.
- Make the dumpLisp output "pretty" and indented.
- Improve docs of `dumpTree` and `dumpLisp` macros.
With:
dumpLisp:
echo "Hello, World!"
Output before this commit:
StmtList(Command(Ident("echo"), StrLit("Hello, World!")))
Output after this commit:
(StmtList
(Command
(Ident "echo")
(StrLit "Hello, World!")))
* Re-use the traverse proc inside treeRepr for lispRepr too
- Add module-local `treeTraverse` proc.
- Also fix treeRepr/dumpTree not printing nnkCommentStmt node contents.
* More doc string updates
* Allow unindented lispRepr output for tests
* Update a test affected by the lispRepr change
* Fix dumpTree
* Add note about lispRepr and dumpLisp to changelog [ci skip]
2018-10-27 14:10:05 +01:00
cooldome
eaca5be9d6
Change the order of compilation passes, transformation is made lazy at code gen ( #8489 )
...
* Ast no transformation
* Add getImplNoTransform to the macros module
* progress on delaying transf
* Fix methods tranformation
* Fix lazy lambdalifting
* fix create thread wrapper
* transform for lambda lifting
* improve getImplTransformed
* Fix destructor tests
* try to fix nimprof for linux
2018-10-18 20:21:25 +02:00
Arne Döring
f9bc4d014a
changelog entry
2018-10-18 16:07:15 +02:00
Arne Döring
016e0b1aac
fix typo
2018-10-18 15:42:14 +02:00
Arne Döring
358b5225df
fixed comment
2018-10-18 15:39:22 +02:00
Arne Döring
48697dc5bb
added test case for or operator
2018-10-18 15:39:22 +02:00
Arne Döring
abe8ac1962
or on NimNode
2018-10-18 15:39:22 +02:00
Vindaar
9cdd9be5a5
fixes #8916 by fixing typeinfo and marshal. ( #9341 )
...
* fixes #8916 by removing `tyString`, `tySeq`, mod. marshal, typeinfo
Need to check in `typeinfo` for nil of the underlying pointer.
In marshal don't have to check for nil of seq anymore.
* remove reference to string, sequence in `isNil` doc string
2018-10-13 08:47:58 +02:00
LemonBoy
0ead36dae6
Unchecked arrays now have their own type ( #9267 )
2018-10-10 21:03:18 +02:00
LemonBoy
32d5b80938
Fix macro expansion in expandMacros ( #8998 )
...
* Fix macro expansion in expandMacros
Running a semanticized node trough the semantic pass was a bad idea.
Fixes #7723
* Simpler smaller implementation
2018-10-09 23:24:54 +02:00
Timothee Cour
64ae47e6f0
Update macros.nim ( #9182 )
...
* Update macros.nim
* Update macros.nim
2018-10-03 20:33:57 -07:00
Zahary Karadjov
97fefa3f50
some simple sub-expression elimination not applied by the previos author
2018-09-17 22:17:39 +03:00
Zahary Karadjov
95072fbcc3
Bugfix: custom pragmas were not working on public fields
2018-09-17 22:17:39 +03:00
Andreas Rumpf
f7d1902043
fixes merge conflicts
2018-09-11 17:27:47 +02:00
cooldome
e63c66b810
Add sym owner to macros ( #8253 )
2018-09-03 13:25:59 +02:00
LemonBoy
5cd152bfda
Allow hint and warning to specify its loc info ( #8771 )
...
Let's bring those to feature-parity with `error`.
2018-08-28 22:59:28 +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
Andreas Rumpf
696c0c48c7
fixes merge conflict
2018-08-19 15:14:03 +02:00
andri lim
6e3d1dced5
fixes #5617 , 'copyLineInfo' addition ( #8523 )
2018-08-05 23:38:21 +02:00
Araq
7ac6462cbd
make at least bootstrapping work
2018-08-05 14:17:24 +02:00
Andreas Rumpf
abe0725ab1
WIP: nothing works
2018-08-05 09:38:14 +02:00
andri lim
78c0ac5407
fixes #7827 , bindSym enhancement ( #8499 )
...
* bindSym power up, working prototype
* update bindSym doc
* add bindSym test
* fix some typo
* fix bindSym doc
* get rid of specialops field from vm
* add experimental: dynamicBindSym
2018-08-02 12:56:44 +02:00
Timothee Cour
818d9be311
lineInfoObj (and check, expect) now return absolute paths (#8466 )
2018-07-31 23:02:04 +02:00
Andreas Rumpf
ef4b755183
allows a destructor to be attached to a tyString/tySequence
2018-07-27 18:20:13 +02:00
Andreas Rumpf
4ec91a30c4
allocators: add deallocAll proc pointer
2018-07-27 18:19:18 +02:00
andri lim
9c3336dcff
fixes #8371 , macros.hasCustomPragma doesn't crash anymore ( #8378 )
...
* fixes #8371 , macros.hasCustomPragma doesn't crash anymore
* fix macros.hasCustomPragma
2018-07-20 19:48:12 +02:00
Andreas Rumpf
4389409e26
fix merge conflict
2018-07-18 09:46:30 +02:00