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
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
Andreas Rumpf
5b59852406
system.substr is not implemented with compilerProcs anymore
2018-07-11 16:39:16 +02:00
cooldome
dec97924a4
Custom pragmas in proc types ( #8205 )
2018-07-09 12:11:03 +02:00
Andreas Rumpf
b5194f592c
WIP: an API for VM replay global state support
2018-06-03 20:18:43 +02:00
Andreas Rumpf
6d19d1eeb2
macros.nim: remove deprecated symbols
2018-06-03 20:15:12 +02:00
Zahary Karadjov
bdcb729597
Better support for treating templates and macros as symbols.
...
This allows you to pass a template or a macro to another macro
which can then inspect the implementation of the former template/macro
using `getImpl`.
Since templates can be freely redefined, this allows you to treat
their symbols as compile-time variables that have lexical scope.
A motivating PoC example for a logging library taking advantage of
this will be provided in the next commit.
Implementation details:
* The name of a template or a macro will be consider a symbol if
the template/macro requires parameters
* For parameterless templates/macros, you can use `bindSym`, which
was extended to also work outside of compile-time procs.
2018-05-07 09:37:49 +02:00
RSDuck
3402926372
hasCustomPragma/getCustomPragmaVal: small fix ( #7650 )
...
* fix hasCustomPragma/getCustomPragmaVal for types without pragma
* fix pragma on pointer test
* removed trailing spaces
2018-04-19 11:07:45 +02:00
Dmitry Atamanov
412cd61dab
Fixes #7595 ( #7623 )
...
* Fixes #7595
* Add brackets
* Fix for treeRepr and lispRepr too
2018-04-16 19:37:08 +02:00
Timothee Cour
04df7f147c
update macros.nim: followup on pull #7598 ( #7619 )
...
@Araq @krux02
https://github.com/nim-lang/Nim/pull/7598 seemed inaccurate eg for NLineInfo there's `mNLineInfo` but no opcNLineInfo
2018-04-16 09:08:52 +02:00
Arne Döring
ed5b7cbac0
move eqIdent to vm.nim ( #7585 )
...
* Strutils comment changes.
* fix typo
2018-04-15 23:38:43 +02:00
jcosborn
2478be3f21
add example to docs for getTypeInst and getTypeImpl ( #7206 )
...
* add example to docs for getTypeInst and getTypeImpl
* made examples use runnableExamples
* changed assert to doAssert
2018-04-15 13:51:16 +02:00
RSDuck
3d1d163eff
fixes #7451 ( #7575 )
2018-04-14 08:33:36 +02:00
Andreas Rumpf
47335aab41
introduce nkTupleConstr AST node for unary tuple construction; breaking change
2018-04-13 17:45:58 +02:00
Arne Döring
55fe3d87a7
added comment to macros ( #7598 )
...
* added comment to macros
* Update macros.nim
2018-04-13 14:05:07 +02:00
Andreas Rumpf
19a1cc914f
deprecate macros.callsite; fixes #7369
2018-04-12 20:09:44 +02:00
genotrance
c3cc52087f
Added a few useful os calls to VM ( #7440 )
2018-04-12 13:59:14 +02:00
Arne Döring
6baca58693
Get symbol kind ( #7491 )
2018-04-11 16:48:01 +02:00
Arne Döring
5d46e1eaa2
Fixes #7473 ( #7475 )
...
* removed code duplication
* changelog entry, adopt tests for changes
2018-04-04 15:37:07 +02:00
Andreas Rumpf
d837362216
C codegen: preparations for different seq and string implementations
2018-04-03 10:25:20 +02:00
PMunch
a9f21cffdf
Add CommentStmt to astGenRepr ( #7313 )
...
* Added codeRepr and dumpCode to the macros module.
This allows those writing macros to write examples, get the code to generate the AST for that example, and then modify that code to be dynamic with the macro function.
2018-03-16 15:57:40 +01:00
Andreas Rumpf
0495e6cf3a
steps to get for loops as expressions
2018-02-28 20:30:17 +01:00
cooldome
2c9e56a783
Implement custom annotations ( #6987 )
2018-01-09 15:25:22 +01:00
Dmitry Atamanov
b31151f68e
New runtime: fix allocator inheritable ( #7046 )
2018-01-09 11:22:29 +01:00