Commit Graph

47 Commits

Author SHA1 Message Date
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
Araq
4f1b89c30c year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Araq
a6f90d4cdd first steps to C file merge operation for incremental compilation 2011-10-21 01:06:24 +02:00
Zahary Karadjov
0b197ade6c Multiple C lines corresponding to a single nimrod line are joined together
This patch greatly improves the "step over" operation available in debuggers.
In practice, there are often 4-8 lines of C code generated for each nimrod line
Each such line will be responsible to a single step in the debugger that is
a) not expected by the user
b) taking the user to an incorrect line in the nimrod code

To keep this working, all code generation should use the rope formatting
facilities when producing new lines (i.e. $n and $N).
New semantics for the format string are introduced:
$n means "soft new line" that could be joined/broken when lineDir is enabled.
$N means "hard new line" that will always appear as a new line.

As an alternative to this approach, I also tested producing code like this:
#line "code.nim" 154
foo = bar; \
foo(bar) \

This is better for readability of the final output, but unfortunately it didn't
produce the desired result across all compilers/debuggers.
2011-09-20 14:11:06 +03:00
Araq
dce8949b9b bugfix: 'final' not passed to generic 2011-07-29 01:25:05 +02:00
Araq
922e216b86 got rid of nstrtabs and nhashes modules 2011-06-10 22:49:06 +02:00
Araq
3e9dcc8be5 deprecated system.copy: use system.substr instead 2011-05-14 01:13:44 +02:00
Araq
48dd9679bd := templatable; lexer improvements 2011-04-17 20:17:45 +02:00
Araq
cd292568d7 big repo cleanup 2011-04-12 01:13:42 +02:00