Commit graph

133 commits

Author SHA1 Message Date
ringabout
f7c203fb6c
remove legacy code (#21134)
* remove legacy code

* fixes
2022-12-26 13:20:05 +01:00
Bung
a9bd78d579
fix #12122 (#21096) 2022-12-16 08:01:15 +01:00
Andreas Rumpf
ca1f3f36b9
no ropes WIP (#20433)
* refactorings in preparation for ropes elimination of the C code generator; mostly the usual ': Rope' -> 'result: var Rope' rewrite
* rewrote ccgcalls.nim
* refactored ccgexprs.nim
* ccgliterals: refactoring
* refactoring: code dealing with name mangling
* refactoring: getRecordFieldsAux
* ropes are strings (insert obscene joke here)
* optimize JS code gen
* optimizations and code improvements
* more optimizations
* final cleanups
2022-09-27 10:57:47 +02:00
Andrey Makarov
0f555110e6
Markdown code blocks part 6 (#20292) 2022-08-31 19:39:02 -04:00
flywind
a97b00ad8d
try to optimize hot spots for orc-booting compiler (#20001)
* optimize hot spots fro orc-booting compiler

* remove GC_ref

* minor

* remove comments

* Revert "minor"

This reverts commit 4965a190a2d6457044faa1442795e55bdad57602.

* emulate cursor
2022-07-12 13:07:18 +02:00
flywind
7f6e800caf
move assertions out of system (#19599) 2022-03-23 20:34:53 +01:00
Timothee Cour
3b3006ef16
add comment to astalgo.debug (#18594) 2021-07-27 09:37:11 +02:00
Timothee Cour
8ef6073543
add test case for pure enum redefinition error within enum (fixed in recent PR) (#18266)
* add test case for pure enum redefinition error within enum (fixed in recent PR)

* remove code duplication

* Revert "remove code duplication" (would require bootstrap >= 1.4)

This reverts commit 3f793874c231f847ef015e37a5fd6851f85d9675.

* fixup
2021-06-15 08:56:10 +02:00
Clyybber
8c42f5be02
Small scope refactoring (#18263)
* Small scope refactoring

* Add test for #10251

* Add inline where appropriate
2021-06-14 19:19:58 +02:00
flywind
1e320bc8c5
[docs minor]space for code-block (#16266)
* [docs minor]space for code-block

* correct more errors

* to runnableExamples

* add newline
2020-12-06 09:54:32 +01:00
cooldome
7b19217798
fix #15707 (#15870) 2020-11-09 11:47:29 +01:00
cooldome
00b495de95
Use modern enums in compiler (#15775) 2020-11-02 10:35:24 +01:00
Andreas Rumpf
4e438f9096
const view types; fixes some cases from https://github.com/nim-lang/Nim/issues/15428 (#15488) 2020-10-05 18:31:46 +02:00
cooldome
9295251e68
Implements RFCs #209 (#13995)
* add test
* add changelod entry
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-04-16 21:04:05 +02:00
Juan Carlos
afd0afe0a3
Deprecate when declared(echo):echo (#13840) 2020-04-02 02:56:18 +02:00
Zahary Karadjov
7b7e42be54 More precise error messages for uninitialized fields in the presence of inheritance 2020-04-01 19:38:44 +02:00
Andreas Rumpf
3f29911a94
new feature: --staticBoundChecks:on to enforce static array index checking (#10965) 2020-03-18 14:25:10 +01:00
Timothee Cour
b8a436af93 kochdocs: use a glob instead of hardcoded list; generate docs for compiler/; bugfixes (#13221)
* kochdocs: use a glob instead of hardcoded list; generate docs for compiler/; bugfixes
* fixup after #13212 isRelativeTo got merged
2020-01-23 11:06:28 +01:00
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
Araq
6c487a6309 fixes #12196 2019-09-16 12:12:44 +02:00
Araq
99425ff21d fixes #12174 2019-09-11 11:59:12 +02:00
Clyybber
ed1d41c51e Small ast.nim cleanup (#12156)
* Remove sonsLen
* Use Indexable
2019-09-09 11:54:15 +02:00
Araq
790f5bac01 added a simple debugging helper 2019-09-08 13:08:41 +02:00
Andreas Rumpf
ac6fcab7a4 Merge branch 'devel' into uint-range-checks 2019-09-02 22:03:10 +02:00
Andreas Rumpf
7ef85db9a9
fixes #12020 (#12106) 2019-09-02 15:47:56 +02:00
Arne Döring
a562de2d91 squashed and merged with devel 2019-08-21 19:24:36 +02:00
Arne Döring
5b27b263fd Remove immediate pragma (#11308)
* remove immediate from tests
* remove immediate from the compiler
2019-05-29 22:21:51 +02:00
Miran
bab5e30972 fixes #10963, disallow implicit mixing of strings and ints/floats (#11292) 2019-05-21 21:32:37 +02:00
Clyybber
cc28eef38e Replace countup(x, y) with x .. y 2019-05-07 12:37:28 +02:00
Clyybber
f18b3af9d4 Replace countup(x, y-1) with x ..< y 2019-05-07 12:32:05 +02:00
Araq
0e157de3a0 astalgo: use the code style that the other lines use; make debug() less verbose 2019-04-16 10:35:43 +02:00
Andreas Rumpf
bf592c4e94
more destructor based changes (#10885)
* mark user defined destructors with sfOverriden to simplify the logic
* refactoring in preparation to merge liftings and generic instantiations for destructors
* ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on
* renamed 'patterns' switch to 'trmacros' as it was totally misleading before
* destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking
* test for invalid/too late destructor introductions
* liftdestructors: make code robust for nimsuggest
* --newruntime works for hello world again
* newruntime: code generation for closures
2019-03-23 00:12:05 +01:00
cooldome
8ceba8a7f3 fixes #10807 (#10814)
* fixes  #10807
* use nkAddr instead of nkHiddenAddr
2019-03-12 13:45:05 +01:00
Andreas Rumpf
5b1a2eecd5 owned refs must be moved 2019-03-07 12:50:33 +01:00
Arne Döring
20a21aa184 colors for debugging (not for windows) (#10786) 2019-03-05 19:58:14 +01:00
Arne Döring
ebe0473511 More depth debug proc (#10782)
* improved output on debugType
* cycle detection in debug print
* debug info finally really helpful
* finally usable debug info
* quote enum values
2019-03-04 09:17:47 +01:00
Arne Döring
287206f993 minor fix for debug on symbols (#10742) 2019-02-26 15:45:01 +01:00
Arne Döring
f4b2793bdf reduce debug output (#10638) 2019-02-13 23:30:14 +01:00
Araq
366b6be4fb compiler refactoring: TSymSeq is gone for good 2018-12-11 12:37:05 +01:00
Araq
abbafe606e IC: further progress 2018-12-01 00:36:14 +01:00
Andreas Rumpf
539fc5d58b improve the error message for 'attempt to redefine X'; fixes #447 2018-09-17 19:54:56 +02:00
Araq
64517445ea even more strict isNil handling for strings/seqs in order to detect bugs 2018-08-22 12:35:46 +02:00
LemonBoy
c04404635b Fix unsound transform pass (#8633)
When a `var openArray[T]` function parameter goes trough the
`transformAddrDeref` pass we may lose the `var` specifier, leading to
nasty crashes at runtime.
2018-08-14 20:38:04 +02:00
Arne Döring
97d37aeb0b Gdb pretty printers (#8263) 2018-07-16 19:30:05 +02:00
Andreas Rumpf
edc3806aa2
Merge pull request #8120 from krux02/basic-debugging
make basic debugging possible
2018-06-26 23:58:07 +02:00
Arne Döring
ba3c6d022b make basic debugging possible 2018-06-26 01:42:36 +02:00
Zahary Karadjov
31651ecd61 allow referencing other parameters in default parameter values
fix #7756
fix #1201
fix #7000
fix #3002
fix #1046
2018-06-16 16:46:32 +03:00
Zahary Karadjov
e719f211c6 fix #6928; fix #7208 2018-06-16 16:46:32 +03:00
Andreas Rumpf
8ba7e7d807 toy program works with incremental compilation 2018-06-07 18:24:16 +02:00
Andreas Rumpf
545b1582cd refactoring: make projectMainIdx typesafe 2018-05-27 22:30:36 +02:00