summary refs log tree commit diff stats
path: root/compiler/tccgen.nim
Commit message (Collapse)AuthorAgeFilesLines
* replaces `doAssert false` with `raiseAssert` for unreachable branches, which ↵ringabout2023-08-101-1/+1
| | | | | works better with strictdefs (#22436) replaces `doAssert false` with `raiseAssert`, which works better with strictdefs
* make implicit cstring conversions explicit (#19488)ee72022-08-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Nim manual says that an implicit conversion to cstring will eventually not be allowed [1]: A Nim `string` is implicitly convertible to `cstring` for convenience. [...] Even though the conversion is implicit, it is not *safe*: The garbage collector does not consider a `cstring` to be a root and may collect the underlying memory. For this reason, the implicit conversion will be removed in future releases of the Nim compiler. Certain idioms like conversion of a `const` string to `cstring` are safe and will remain to be allowed. And from Nim 1.6.0, such a conversion triggers a warning [2]: A dangerous implicit conversion to `cstring` now triggers a `[CStringConv]` warning. This warning will become an error in future versions! Use an explicit conversion like `cstring(x)` in order to silence the warning. However, some files in this repo produced such a warning. For example, before this commit, compiling `parsejson.nim` would produce: /foo/Nim/lib/pure/parsejson.nim(221, 37) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] /foo/Nim/lib/pure/parsejson.nim(231, 39) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] This commit resolves the most visible `CStringConv` warnings, making the cstring conversions explicit. [1] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/doc/manual.md#cstring-type [2] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/changelogs/changelog_1_6_0.md#type-system
* move tinyc to a separate repo and allow installing external dependencency ↵Timothee Cour2020-04-031-21/+34
| | | | | | | (eg tinyc) from koch / library code (#13850) * remove tinyc * installDeps * update tinyc paths
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-1/+1
| | | | | | | | | | | | | | | | | | * 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
* fixes the remaining fixable Nimrod->Nim renamings; closes #2032Araq2018-09-031-11/+11
|
* nimrod is obsoleteAraq2015-11-031-2/+2
|
* compiler: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-041-11/+11
| | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
* Nimrod renamed to NimAraq2014-08-281-1/+1
|
* Allow arguments for "nimrod run"def2014-07-281-5/+3
|
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
|
* bugfix: wrong assertions for C++ code generation; some solaris support; ↵Araq2012-10-301-3/+5
| | | | first steps to an effect system
* year 2012 for most copyright headersAraq2012-01-021-1/+1
|
* big repo cleanupAraq2011-04-121-0/+76