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
Ștefan Talpalaru
10f5f67767
gogc: GCC-8.2.0 compatibility and other improvements ( #9211 )
...
- Go's write barriers are now plugged-in in all the relevant points
- "gcGo" is correctly classified by usesWriteBarrier()
- some gogc structures and functions now use golib wrappers to keep GCC
version-specific conditions out of the compiler/stdlib code
- we no longer allow mixing the C malloc with Go's
- fix a problem with string copying
2018-10-11 22:15:17 +02:00
LemonBoy
7775b7efd1
Fix wrong heuristic in codegen ( #9293 )
...
A bare return may trigger the insertion of a genericReset.
Fixes #9286
2018-10-11 08:36:05 +02:00
manterolat
16a941a642
Fixes #9154 ( #9193 )
2018-10-10 13:17:28 +02:00
LemonBoy
b97a7dbf3d
Make the registered passes local to the ModuleGraph ( #9259 )
...
Closes #9068
2018-10-09 19:24:02 +02:00
cooldome
036c52f0b6
fixes #9222 ( #9224 )
2018-10-09 15:19:21 +02:00
Andreas Rumpf
c661f8e1be
Merge pull request #8983 from cooldome/codegen_crash
...
Fixes 8979
2018-09-18 09:36:16 +02:00
Andrii Riabushenko
acaf2b8e76
Fixes 8979
2018-09-16 21:33:21 +01:00
Giovanni
e21c3028cb
Removed optUseNimNamespace, removed useless nil check
2018-09-16 08:43:03 +09:00
Giovanni
f1b64e4b96
improve the compiler option "cppCompileToNamespace", a custom namespace can now be set
2018-09-15 20:10:54 +09:00
Andreas Rumpf
86556ebfdb
compiler refactoring; use typesafe path handing; docgen: render symbols between modules
2018-09-07 19:21:16 +02:00
Araq
57a291db33
optimize away genericReset for result assignment; refs #8745
2018-08-27 09:10:40 +02:00
Andreas Rumpf
696c0c48c7
fixes merge conflict
2018-08-19 15:14:03 +02:00
LemonBoy
ac0f5c83ca
Fixes 8535 ( #8591 )
...
* Goodbye postInitProc
* Give preInitProc its own scope
Avoid any conflict between the variables introduced by preInitProc and
initProc since both are codegen'd in the same function body.
* Fix codegen for global var init in emulated TLS
Fixes #8535
* Add test for #8535
* Keep a bogus stack frame around
* Remove more dead code
2018-08-17 00:34:27 +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
Aaron Levine
6512f8688d
Fix #8345 ( #8350 )
2018-07-18 08:08:49 +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
Yuriy Glukhov
dfe3f16022
Don't depend on string.h in codegen ( #8299 )
2018-07-13 17:41:59 +02:00
LemonBoy
d0b60f1fe3
Generate dynlib strings as a single rope ( #8247 )
...
In order not to trip the optimization in genInfixCall we have to do so.
The same trick is also used in setExternName.
Fixes #8241
2018-07-08 22:07:45 +02:00
Andreas Rumpf
b5a96d28c7
codgen refactoring: prepare for alternative string/seq implementations
2018-06-29 11:34:39 +02:00
LemonBoy
bb23d903b6
Don't consider concept types as non-complex during codegen ( #8119 )
...
Fixes #7125
2018-06-27 17:21:53 +02:00
Yuriy Glukhov
8f06763491
Fixes #6803
2018-06-11 22:38:40 +03:00
Andreas Rumpf
61d9292095
fixes merge conflict
2018-06-11 01:25:48 +02:00
Emery Hemingway
22f714585b
Native access to Genode environment
...
Add a 'GenodeEnv' type and a 'componentConstructHook' to the system
module. The 'componentConstructHook' allows for detection of POSIX style
programs that exit implicitly or native Genode components that
initialize to serve RPC requests and OS signals.
This hook takes a 'GenodeEnv' argument so that the environment interface
is passed cleanly to application code after globals are initialized.
This is an typed pointer to a C++ object, procedures for accessing the
environment will be available from a Nimble library and not included in
the standard library.
The standard library has an internal pointer to the environment object
but this is not for external use, the undocumented global environment
pointer has been removed.
2018-06-07 07:21:20 +02:00
Andreas Rumpf
12996c08a1
fixed merge conflict
2018-06-04 16:16:50 +02:00
Andreas Rumpf
826c1e2d78
incremental compilation: implemented basic replay logic
2018-06-02 09:41:27 +02:00
Oscar Nihlgård
eb8f15d97c
Support multi byte characters in module names ( #7916 )
2018-05-31 10:38:43 +03:00
Andreas Rumpf
61fb83ecbb
baby steps for incremental compilation
2018-05-30 23:50:34 +02:00
Andreas Rumpf
669a564492
remove more global variables in the Nim compiler
2018-05-27 11:10:56 +02:00
Andreas Rumpf
cb6a4ffa86
Merge branch 'devel' into araq-big-refactoring
2018-05-21 17:31:23 +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
b2c7910fb6
compiler/ropes.nim has no global error handler anymore
2018-05-17 15:45:41 +02:00
Andreas Rumpf
bf6c2c5ccf
preparations of making compiler/msgs.nim free of global variables
2018-05-17 15:21:22 +02:00
Yuriy Glukhov
6c0185d4b7
Allow better optimisations by removing NOINLINE from module init procs
2018-05-16 19:56:30 +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
297038f704
move more globals into the config object
2018-05-13 14:19:42 +02:00
Andreas Rumpf
1284827df2
C code generator compiles again
2018-05-12 23:45:51 +02:00
Andreas Rumpf
050789a8f4
sem pass compiles again
2018-05-12 21:30:42 +02:00
Andreas Rumpf
88cf6573e0
fixes #7743
2018-05-06 08:59:39 +02:00
Emery Hemingway
cda591a42f
Disable setTerminate when noCppExceptions is defined ( #7751 )
2018-05-04 07:40:40 +02:00
Jacek Sieka
72dfe176f5
remove dead code elimination option ( #7669 )
2018-04-23 11:02:38 +02:00
Andreas Rumpf
33b69f0ed0
refactoring: make FileIndex a distinct type; make line information an uint16; fixes #7654
2018-04-21 08:13:37 +02:00
AdrianV
0ce28d15cc
Nim namespace for cpp ( #7453 )
...
- new option --usenamespace to generate nim cpp code in its own namespace Nim
- minor changes for compatibility with the new Embarcadero = Borland C++-Builder (bcc)
2018-04-15 13:43:01 +02:00
Jacek Sieka
85e21158db
Cleanups 20180401 ( #7458 )
2018-04-12 17:35:10 +02:00
Andreas Rumpf
d837362216
C codegen: preparations for different seq and string implementations
2018-04-03 10:25:20 +02:00
Andreas Rumpf
37a3eb5170
make 'memset' calls more robust; refs #7341
2018-03-16 15:55:46 +01:00
andri lim
4f9f9ea528
fixes #7332 ( #7341 )
2018-03-16 15:32:01 +01:00