Commit graph Nim/compiler/ccgtypes.nim
Author SHA1 Message Date
Araq
4bd9f32f33 --gc:destructors: hello world example compiles and runs 2018-11-16 00:13:49 +01:00
Arne Döring
b306e0bfe2 feedback injected 2018-11-08 22:28:29 +01:00
Arne Döring
16353c2ac8 fix #8011 2018-11-08 22:28:29 +01:00
Araq
e71410d74e language cleanup: the .unchecked pragma is dead 2018-11-06 13:55:03 +01:00
Araq
05964b95e4 change system.nim to adhere to the style guide 2018-10-30 15:03:28 +01:00
cooldome
7a5b614edc fixes #9297 (#9298)
* fixes #9297

* improve spacing
2018-10-11 09:54:50 +02:00
LemonBoy
0ead36dae6 Unchecked arrays now have their own type (#9267) 2018-10-10 21:03:18 +02:00
xzfc
505ae14f4b Codegen fix for procs taking type(nil) (#9231) 2018-10-09 14:51:34 +02:00
Araq
7bac21ac23 ccgtypes: improve internal documentation 2018-10-02 19:33:29 +02:00
Andreas Rumpf
9a9005622b make t7346 work again 2018-09-24 16:00:57 +02:00
LemonBoy
6af6ca6351 Fix codegen for set[T] parameters
Sometimes sets are materialized as arrays and we must treat them as
such: the CPP backend is pickier than the C one and would sometimes
produce invalid code.

Fixes #8967
2018-09-15 11:55:11 +02:00
Vindaar
52f03fabc1 fixes #8781 by appending "_U" instead of 'U' (#8787) 2018-08-27 08:35:07 +02:00
Andreas Rumpf
f485ebe162 --gc:destructors: next steps; WIP 2018-07-21 13:16:53 +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
Oscar Nihlgård
332469692d Bugfix for modules with multi byte characters in the name (#8319) 2018-07-14 16:00:51 +02:00
Andreas Rumpf
74bf316619 more progress on destructor based strings 2018-07-13 21:15:47 +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