Oscar Nihlgård
332469692d
Bugfix for modules with multi byte characters in the name ( #8319 )
2018-07-14 16:00:51 +02:00
LemonBoy
cecce80d42
Fix template codegen with static parameters ( #8110 )
...
* Fix template codegen with static parameters
Fixes #7477
* Move the test case to tstaticimportcpp
2018-06-27 22:46:46 +02:00
Andreas Rumpf
61d9292095
fixes merge conflict
2018-06-11 01:25:48 +02:00
Zahary Karadjov
5f2cdcd4fa
fix #7653
2018-06-10 22:27:51 +03:00
Andreas Rumpf
feef109e60
make tests green again
2018-05-18 20:53:41 +02:00
Andreas Rumpf
a4e2b0c153
platform.nim doesn't use globals anymore; prepare msgs.nim for not using globals
2018-05-18 15:18:00 +02:00
Andreas Rumpf
bf6c2c5ccf
preparations of making compiler/msgs.nim free of global variables
2018-05-17 15:21:22 +02:00
Araq
635451591d
extccomp: no globals anymore
2018-05-16 02:01:55 +02:00
Andreas Rumpf
328e7a1005
options.nim: no global variables anymore
2018-05-13 17:52:21 +02:00
Andreas Rumpf
1284827df2
C code generator compiles again
2018-05-12 23:45:51 +02:00
zah
e3037a2f33
Support code hot reloading for JavaScript projects ( #7362 )
...
* Support code hot reloading for JavaScript projects
* Add some missing JavaScript symbols and APIs
* fix the Travis build
* (review changes) remove the js type from the standard library as it doesn't follow NEP-1
* more additions to the DOM module
* Follow NEP-1 in jsffi; spell 'hot code reloading' correctly
* introduce a jscore module
* Document jscore module.
* readded js type
* Remove the '$' operator that doesn't behave
2018-04-13 19:08:43 +02:00
Jacek Sieka
85e21158db
Cleanups 20180401 ( #7458 )
2018-04-12 17:35:10 +02:00
cooldome
16c1a90857
Cpp codegen: handling of imported exceptions. Fixes #3571 ( #7360 )
2018-04-10 12:14:59 +02:00
Andreas Rumpf
d837362216
C codegen: preparations for different seq and string implementations
2018-04-03 10:25:20 +02:00
zah
121b9e26fb
Static[T] fixes ( #7333 )
...
* fix the usage of unresolved static[T] parameters in proc signatures
* fix tsametype and tmacrogenerics
* Allow creating composite type classes with concepts and using them in type signatures
* Allow integers to be used in ident concatenations
* Support using imported C++ generic types in proc signatures
* fixes #7230
* closes #7379
* re-enable some metatype tests
2018-03-24 15:28:09 +01:00
cooldome
70b28a39fe
Codegen: use type forward declarations more aggresively. Fixes #7339 ( #7340 )
...
Do not emit object definition it if used only by ref or ptr
2018-03-16 16:21:03 +01:00
zah
cbd059aa85
Fix #6415 ( #7281 )
...
* hangle static generic params when used in the importcpp pragma
* importcpp works for generic types with fields; fixes #6415
* revert a too agressive safety check that ended up breaking the tests
2018-03-08 15:10:45 +01:00
cooldome
d24b6667c6
genTryCpp to catch by Nim type, ready for first review ( #7196 )
...
* Rewrite genTryCpp
* correction
* Implement polymorphic raise in cpp
* revert backticks in emit
* Cleanp a comment
* revert test changes
* better handling of <new> header
2018-02-12 21:23:34 +01:00
Andreas Rumpf
b5538990a2
nimTypeNames feature: show generics properly
2018-01-31 14:29:08 +01:00
sleepyqt
a54430ea2d
Fix struct packing for VCC. ( #7049 )
...
"#pragma pack(1)" sets current alligment without pushing into stack,
so "#pragma pack(pop)" causing stack underflow.
2018-01-09 23:02:09 +01:00
Andreas Rumpf
e4081a7201
preparations for language extensions: 'sink' and 'lent' types
2018-01-07 23:09:26 +01:00
Andreas Rumpf
be16dfd195
make tests green again
2017-12-13 22:16:37 +01:00
Araq
c35788b97c
make hidden visibility the default for Unix
2017-12-13 14:37:19 +01:00
Araq
00a230e5d8
Leak detector: give more info for anon ref objects
2017-12-08 09:19:55 +01:00
Andreas Rumpf
70ea45cdba
deprecated unary '<'
2017-10-29 08:37:13 +01:00
Andreas Rumpf
c17f6c7837
new feature: package level objects
2017-10-29 07:54:39 +01:00
Andreas Rumpf
c6235920cb
backend preparations for incomplete/forwarded object types
2017-10-28 13:46:43 +02:00
Araq
5258447e01
concepts: make codegen aware of 'tyInferred'
2017-10-25 17:37:03 +02:00
Andreas Rumpf
4eaa2bf15d
improve code generation for custom strings/seqs
2017-10-14 20:37:49 +02:00
Andreas Rumpf
d8746398c4
allow macros to produce nnkGotoState and nkState
2017-10-09 21:12:40 +02:00
Andreas Rumpf
f7f3a25be8
first steps of making 'opt' a first class type for Nim
2017-09-25 13:19:36 +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
cooldome
82453825e9
Make Nim gdb pretty print friendly ( #6240 )
2017-08-24 10:21:38 +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
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
Andreas Rumpf
ad608838bf
closures have an object type field so that we can perform correct deepCopy() for the BoehmGC target
2017-07-22 11:10:52 +02:00
Araq
91eba77b96
fixes #4763
2017-07-17 09:28:03 +02:00
Andreas Rumpf
91a3cb67ec
fixes #5824
2017-06-13 13:51:33 +02:00
Andreas Rumpf
503f780676
Merge branch 'zahary' into araq2
2017-05-16 17:32:18 +02:00
Zahary Karadjov
4da8536701
fix compilation regression in alea
2017-04-16 13:42:33 +03:00
Jacek Sieka
e512358bc9
Linux abi take 3 ( #5692 )
...
* avoid generating object fields for imported types
* fix some abi/type issues for linux_amd64
2017-04-12 22:57:10 +02:00
Zahary Karadjov
e11b3520ff
fix #5654
2017-04-07 19:35:05 +03:00
Zahary Karadjov
c605d57574
restore compilation and make all concepts tests green
2017-03-24 17:03:55 +02:00
Zahary Karadjov
76c663f692
support for inferring static[T] concept params
2017-03-24 16:58:15 +02:00
Zahary Karadjov
8cd5f1f8f5
introduce tyInferred for the unbound concept type params
...
* Why is tyInferred needed?
The bindings in TCandidate are capable of inferring types within a single
call expression. In concepts, we need to infer types in the same way, but
across the whole body of the concept.
Previously, once a concept type param was inferred, it was destructively
mutated using t.assignType, but this proved to be problematic in the presence
of overloads, because the bindings established while a non-matching overload
is tested must be reverted/forgotten. tyInferred offers a non-destructive way to
keep track of the inference progress.
While introducing new types usually requires a lot of code paths in the compiler
to updated, currently tyInferred is only a short-lived type within the concept body
pass and it's unlikely to introduce breakage elsewhere in the compiler.
2017-03-24 16:58:15 +02:00
Araq
46b672a6c4
minor codegen bugfix: don't use names for closures that are also mangled Nim names
2017-02-26 17:41:00 +01:00
Araq
4c5ecb46b0
fixes a minor codegen issue where name mangling could produce an identifier used by the codegen; refs #5437
2017-02-26 17:41:00 +01:00
Araq
dd8cbf5fca
fixes #5404
2017-02-17 17:44:52 +01:00
Andreas Rumpf
848676cec6
name mangling bugfixes; ndi file generation for debugger support
2017-02-03 09:49:36 +01:00