Commit Graph

58 Commits

Author SHA1 Message Date
Clyybber
7e747d11c6 Cosmetic compiler cleanup (#12718)
* Cleanup compiler code base

* Unify add calls

* Unify len invocations

* Unify range operators

* Fix oversight

* Remove {.procvar.} pragma

* initCandidate -> newCandidate where reasonable

* Unify safeLen calls
2019-11-28 17:13:04 +01:00
Clyybber
cc28eef38e Replace countup(x, y) with x .. y 2019-05-07 12:37:28 +02:00
Arne Döring
abb05ab645 fewer ropes (#11037) 2019-04-19 09:05:31 +02:00
Andreas Rumpf
c86b1fbcac fixes a critical GC safety inference bug (#10615)
* fixes a critical GC safety inference bug
* make nimsuggest compile again
* make Nimble compile again
2019-03-05 19:54:44 +01:00
Andreas Rumpf
86556ebfdb compiler refactoring; use typesafe path handing; docgen: render symbols between modules 2018-09-07 19:21:16 +02:00
Andreas Rumpf
dae5450947 WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
Andreas Rumpf
669a564492 remove more global variables in the Nim compiler 2018-05-27 11:10:56 +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
Araq
f89218c8b0 fixes #7730, fixes #7746 2018-05-02 08:27:19 +02:00
Andreas Rumpf
7e0540ed80 the compiler does not rely on the zero terminator anymore 2018-04-29 01:09:05 +02:00
Zahary Karadjov
c446806f75 improve the debugging experience when line directives are used 2017-09-04 18:17:22 +03:00
Andreas Rumpf
ff3cf001a3 fixes #4656; ropes.nim checks properly for file equality 2016-08-26 18:00:12 +02:00
Adam Strzelecki
d681812465 compiler: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:03:22 +02:00
Jacek Sieka
ff914b89d3 compiler_ropes: more lib_ropes porting 2015-04-08 23:30:03 +08:00
def
39049e151f Get rid of deprecation warnings 2015-04-07 15:47:18 +02:00
Jacek Sieka
0f131b9f46 ropes: remove more unnecessary checks 2015-04-03 23:30:42 +08:00
Jacek Sieka
d7a42641ab compiler_ropes: remove unnecessary length check
frmt[frmt.len] isn't an out-of-bounds access for strings (!)
2015-04-03 23:21:19 +08:00
Jacek Sieka
71e785904b compiler_ropes: deprecate old function names 2015-04-01 22:32:15 +08:00
Jacek Sieka
a9ef5bf459 compiler_ropes: TRope -> RopeObj, PRope* -> Rope* 2015-04-01 22:32:15 +08:00
Jacek Sieka
bcdb5b0836 compiler_ropes: toRope -> rope 2015-04-01 22:32:15 +08:00
Jacek Sieka
aafbe5c866 ropes: make lib & compiler frmt more similar, fix out-of-bounds accesses in lib ropes 2015-04-01 22:32:15 +08:00
Jacek Sieka
91f42a2943 compiler_ropes: ropef -> %, appf -> addf 2015-04-01 22:32:15 +08:00
Jacek Sieka
171996465f compiler_ropes: ropeEqualsFile -> equalsFile, no more max rope component length
read file data in bigger blocks, avoiding lots of file api calls

also removed crc step - seems easier to simply compare the bytes rather
than calculating two crc's
2015-04-01 22:32:15 +08:00
Jacek Sieka
80ee28daf7 compiler_ropes: add & and add
Invokations still need to be updated, but that's a lot of changes, so
save for later
2015-04-01 22:32:15 +08:00
Jacek Sieka
c40249cd43 compiler_ropes: ropeToStr -> $ 2015-04-01 22:32:15 +08:00
Jacek Sieka
b4e4ea8d1b compiler_ropes: don't expose newRope 2015-04-01 22:30:39 +08:00
Jacek Sieka
97d2df9bac compiler_ropes: ropeLen -> len 2015-04-01 22:30:39 +08:00
Araq
a541be8935 prepare for upcoming parsing change of unary operators 2015-03-22 09:31:15 +01:00
Federico Ceratto
657dca5c3b Fix typos 2015-02-15 16:20:32 +00:00
Araq
2781fea9e2 Nimrod renamed to Nim 2014-08-28 09:38:14 +02:00
Araq
2f43fdb837 renamefest 2014-08-23 01:43:49 +02:00
Zahary Karadjov
afddae5aaf Merge branch 'upstream' into devel
Conflicts:
	compiler/ccgutils.nim
	compiler/msgs.nim
	compiler/sem.nim
	compiler/semexprs.nim
	compiler/seminst.nim
	compiler/semmagic.nim
	compiler/semstmts.nim
	compiler/semtypes.nim
	compiler/semtypinst.nim
	compiler/sigmatch.nim
	compiler/types.nim
	compiler/vmgen.nim
	lib/core/macros.nim
	lib/system.nim
	tests/reject/tenummix.nim
	web/news.txt
2013-12-29 17:21:00 +02:00
Araq
438703f59e case consistency: next steps 2013-12-29 01:13:51 +01:00
Araq
92b8fac94a case consistency part 4 2013-12-27 23:10:36 +01:00
Araq
2df9b442c6 case consistency part 1 2013-12-27 15:48:53 +01:00
Zahary Karadjov
027f30610e static params: expr[T] is now static[T]
This introduces tyStatic and successfully bootstraps and handles
few simple test cases.  Static params within macros are no longer
treated as PNimrodNodes - they are now equivalent to constants
of the designated type.
2013-12-19 01:06:38 +02:00
Grzegorz Adam Hankiewicz
72a3e21f28 Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
Zahary Karadjov
d0edb1826b adds an option to interleave the generated code with snippets from the original source
Lines from the original source are outputted as comments next to line directives.
Hopefully, this will make debugging codegen problems easier.

Other changes:
The frame setup code now uses a single-line C macro. My motivation was to reduce
the noise in the generated output and make it easier to step over the boiler-plate
code, but counter-intuitively this also improved the overall compilation speed a
little bit so I applied the same treatment to line tracking too (this reduces the size of
the generated files and the explanation is that probably the I/O overhead dominates
the macro expansion costs).
2012-12-02 20:36:29 +02:00
Zahary Karadjov
c67520a7c5 temporary debugging code for the memory leak investigation 2012-11-28 01:15:14 +02:00
Zahary Karadjov
a42545ea3e disables the compile-time rope formatting during bootstrapping 2012-11-28 01:15:14 +02:00
Zahary Karadjov
f644e3079f experimental compile-time rope formatting code 2012-11-28 01:15:13 +02:00
Araq
214c7a2ebd implemented a stack trace profiler 2012-09-15 00:21:10 +02:00
Araq
0171566c98 openarray/varargs split; breaks bootstrapping 2012-08-16 08:34:33 +02:00
Araq
b0c11d3efb made compiler more robust for idetools support 2012-07-30 17:43:22 +02:00
Araq
538b06a123 implements #173 2012-07-28 14:16:08 +02:00
Araq
869a5aa90d doc2 improvements 2012-06-24 02:34:11 +02:00
Araq
76235348f8 extracted documentation generator 2012-05-09 01:50:08 +02:00
Araq
959e370ae9 @ is a sigil-like operator 2012-04-15 10:02:15 +02:00
Araq
fe750a5cf9 performance improvements for ropes 2012-04-13 18:36:55 +02:00