| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
(#21459)
fixes #20422; emit nimPrepareStrMutationV2 for toOpenArray to keep the abstraction of mutable strings which have immutable string literals
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes #19291; implements `wasMoved` hook
* basics
* checkpoint
* finish `wasMoved`
* add a test for #19291
* add documentation and changelog
* work `attachedWasMoved` with generics
* fixes optimizer
* register `=wasMoved`
* handle wasMoved magcis
* check another round
* some patches
* try `op == nil`
* nicer
* generate `wasMoved` before `destroy`
* try again
* fixes tests
* default wasMoved
* Update tests/destructor/tv2_cast.nim
* Update tests/destructor/tv2_cast.nim
* Update tests/arc/topt_refcursors.nim
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parses the whole module at one time (#21379)
* fixes #19795; remove parse pipeline
* isScript
* fixes nimscriptapi
* don't touch reorder
* check script
* fixes tests
* it seems implicit imports of system cause troubles
* access the first child of `nkStmtList`
* ignore comments
* minor messages
* perhaps increases hloLoopDetector
* the module is a stmtList, which changes the errors
* fixes nimdoc
* fixes tlinter
* fixes nim secret tests
* fixes arc_misc
* fixes nim secret tests again
* safe; fixes one more test
* GlobalError is the root cause too
* fixes parsing errors
* put emit types to the cfsForwardTypes section
* fixes #11852; `{.push checks:off}` now works in procs
* disable navigator
* fixes nimdoc
* add tests for JS
* fixes nimsuggest
|
|
|
|
|
|
|
| |
* fixes #21171; dyn destructors for acyclic inherited refs
* add a test
* Update compiler/liftdestructors.nim
|
| |
|
|
|
|
|
| |
* bounchecks for len(toOpenArray())
* add a testcase
|
|
|
|
|
|
|
|
|
| |
* rename `std/threads` to `std/oldthreads`
* fixes tests
* rename to `typedthreads`
* changelog
|
|
|
|
|
| |
* fixes an ARC bug
* add a testcase
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* temp
* unsure
* fix condition
* port macro arc runable examples to one file
* trigger doc ci
* fix
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
|
|
| |
* Revert "fix arc global variable issues (#20759)"
This reverts commit a3d32a4176539d0829a4e868f4b005a1a71eb7ee.
* trigger documentation builds
|
|
|
|
|
| |
* temp
* unsure
|
|
|
|
|
|
|
|
|
|
|
| |
* put `std/threads` under the umbrella of `nimPreviewSlimSystem`
* add changelog
* fixes tests
* fixes tests again
* fixes tests
|
|
|
|
|
| |
* fixes #20572
* added a test case
|
|
|
|
|
| |
* 'lock levels' are deprecated, now a noop
* fixes tests
|
| |
|
|
|
|
|
|
|
| |
* closes #11267; add testcase
* closes #11259
* closes #11085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes #19231; newFinalize doesn't work with ORC
first make it pass tests
* remove the tables dep
creates a binding for finalized procs in order to handle the same symbols. It used to wrongly generat a new symbol id for the same symbol as the encountered one before
* refactor and revert #14257
* de indentation
* fixes tests; uses instantiated types
|
|
|
|
|
|
|
|
|
|
| |
block (#19953)
* fixes #18645; C Compiler error when initializing {.global.} with a block:
* arguably cleaner solution
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Araq <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes nim check with orc
* fixes tests
* add tests
* fixes tests
* Update tests/arc/t20456.nim
|
|
|
|
|
| |
* move widestrs out of system
* fix osproc
|
|
|
|
|
|
|
|
| |
* produce better code for closure environment creation
* new 'first write' analysis;
* scope based move analyser
* code cleanup
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
| |
* Update message for checking `cast`
* Update error messages in tests
|
|
|
|
|
|
|
|
|
| |
* test CI
* fixes #19457
* add comments
Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#20295)
* fixes #19401; fixes #19402; rework Forward declaration and finalizer for ORC
* add more tests
* give it a name
* make more tests
* fixes tests
* hidden addr for cpp
* move code to a function
|
|
|
|
|
|
|
| |
* add testcase for bug #20305
* Update tcaseobj.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes #19724; don't be aggressive when you infer sink parameters
* better logic and updated tests
* wip
* fixes tests (#20330)
* restore tests
* try splitPath
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
|
|
|
| |
fixes #20303; wasMoved expressions with side effects
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add improved Windows UNC path support in std/os
Original issue: `std/os.createDir` tries to create every component of
the given path as a directory. The problem is that `createDir`
interprets every backslash/slash as a path separator. For a UNC path
this is incorrect. E.g. one UNC form is `\\Server\Volume\Path`. It's an
error to create the `\\Server` directory, as well as creating
`\\Server\Volume`.
Add `ntpath.nim` module with `splitDrive` proc. This implements UNC path
parsing as implemented in the Python `ntpath.py` module. The following
UNC forms are supported:
* `\\Server\Volume\Path`
* `\\?\Volume\Path`
* `\\?\UNC\Server\Volume\Path`
Improves support for UNC paths in various procs in `std/os`:
---
* pathnorm.addNormalizePath
* Issue: This had incomplete support for UNC paths
* The UNC prefix (first 2 characters of a UNC path) was assumed to
be exactly `\\`, but it can be `//` and `\/`, etc. as well
* Also, the UNC prefix must be normalized to the `dirSep` argument
of `addNormalizePath`
* Resolution: Changed to account for different UNC prefixes, and
normalizing the prefixes according to `dirSep`
* Affected procs that get tests: `relativePath`, `joinPath`
* Issue: The server/volume part of UNC paths can be stripped when
normalizing `..` path components
* This error should be negligable, so ignoring this
* splitPath
* Now make sure the UNC drive is not split; return the UNC drive as
`head` if the UNC drive is the only component of the path
* Consequently fixes `extractFilename`, `lastPathPart`
* parentDir / `/../`
* Strip away drive before working on the path, prepending the drive
after all work is done - prevents stripping UNC components
* Return empty string if drive component is the only component; this
is the behavior for POSIX paths as well
* Alternative implementation: Just call something like
`pathnorm.normalizePath(path & "/..")` for the whole proc - maybe
too big of a change
* tailDir
* If drive is present in path, just split that from path and return
path
* parentDirs iterator
* Uses `parentDir` for going backwards
* When going forwards, first `splitDrive`, yield the drive field, and
then iterate over path field as normal
* splitFile
* Make sure path parsing stops at end of drive component
* createDir
* Fixed by skipping drive part before creating directories
* Alternative implementation: use `parentDirs` iterator instead of
iterating over characters
* Consequence is that it will try to create the root directory
* isRootDir
* Changed to treat UNC drive alone as root (e.g. "//?/c:" is root)
* This change prevents the empty string being yielded by the
`parentDirs` iterator with `fromRoot = false`
* Internal `sameRoot`
* The "root" refers to the drive, so `splitDrive` can be used here
This adds UNC path support to all procs that could use it in std/os. I
don't think any more work has to be done to support UNC paths. For the
future, I believe the path handling code can be refactored due to
duplicate code. There are multiple ways of manipulating paths, such as
manually searching string for path separator and also having a path
normalizer (pathnorm.nim). If all path manipulation used `pathnorm.nim`,
and path component splitting used `parentDirs` iterator, then a lot of
code could be removed.
Tests
---
Added test file for `pathnorm.nim` and `ntpath.nim`.
`pathnorm.normalizePath` has no tests, so I'm adding a few unit tests.
`ntpath.nim` contains tests copied from Python's test suite.
Added integration tests to `tos.nim` that tests UNC paths.
Removed incorrect `relativePath` runnableExamples from being tested on Windows:
---
`relativePath("/Users///me/bar//z.nim", "//Users/", '/') == "me/bar/z.nim"`
This is incorrect on Windows because the `/` and `//` are not the same
root. `/` (or `\`) is expanded to the drive in the current working
directory (e.g. `C:\`). `//` (or `\\`), however, are the first two
characters of a UNC path. The following holds true for normal Windows
installations:
* `dirExists("/Users") != dirExists("//Users")`
* `dirExists("\\Users") != dirExists("\\\\Users")`
Fixes #19103
Questions:
---
* Should the `splitDrive` proc be in `os.nim` instead with copyright
notice above the proc?
* Is it fine to put most of the new tests into the `runnableExamples`
section of the procs in std/os?
* [skipci] Apply suggestions from code review
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* [skip ci] Update lib/pure/os.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* Move runnableExamples tests in os.nim to tos.nim
* tests/topt_no_cursor: Change from using splitFile to splitDrive
`splitFile` can no longer be used in the test, because it generates
different ARC code on Windows and Linux. This replaces `splitFile` with
`splitDrive`, because it generates same ARC code on Windows and Linux,
and returns a tuple. I assume the test wants a proc that returns a
tuple.
* Drop copyright attribute to Python
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [Testament] Extend and document message testing aids
* Enable inline msgs when not reject action.
Eliminates the pain of changing the line and column numbers in `nimout`
or `output` while making changes to the test.
* Enable using inline msgs and nimout together.
Allows ease of inline msgs for the test as well as testing msgs from
other modules.
* Add path separator and test filename variable interpolation in
msgs.
Eases handling path separators in the msgs.
* Add some documentation.
* Fixed lots of broken tests
* Fixed more broken tests
* Support multiple inline messages per a line
* Fix a broken test
* Revert variable substitution in `output`
* Remove uneeded params
* Update doc/testament.md
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* Update testament/specs.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* Update testament/specs.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* Fix indentation
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(#19918)
* dec inLoop after exiting the while scope in computeLiveRanges
* add testcase
|
|
|
| |
fix #19862; make widestrs consistent in refc and orc
|
|
|
|
|
|
|
|
|
| |
1.6] (#19723)
* fix #19435; openArray wronyly registers typebounds
* add testcase
* don't create TypeBoundOps for tyOpenArray, tyVarargs
|
|
|
|
|
|
|
|
|
|
|
| |
* [add testcase] arc problems with recursive types
close #9650
* do test
* expand
* Update tests/arc/t9650.nim
|
|
|
|
|
| |
* fix #16458; make useNimRtl compile for --gc:orc/arc
* fix tests
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* don't use a temp for addr
fix #19497
* Update compiler/ccgcalls.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* add a test
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* deprecate unsafeAddr; extend addr
addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr
* follow @Vindaar's advice
* change the signature of addr
* unsafeAddr => addr (stdlib)
* Update changelog.md
* unsafeAddr => addr (tests)
* Revert "unsafeAddr => addr (stdlib)"
This reverts commit ab83c99c507048a8396e636bf22d55fdd84d7d1c.
* doc changes; thanks to @konsumlamm
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
|
|
|
|
|
| |
* style usages (openArray)
* revert doc changes
|
|
|
|
| |
hidden type field for objects with enabled inheritance; fixes #19205 [backport:1.6] (#19232)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[backport] (#18836)
* fix #18410
* one line comment
* typo
* typo
* cover cpp
|
|
|
|
| |
since the example code return value from global variable, instead
of first argument, the `n.len` is 1 which causes compiler crashes.
|
| |
|
|
|
|
|
| |
* fix #16558
* add testcase
|
| |
|
| |
|
|
|
|
|
|
|
| |
* fix #18627
* add testcase
* rename
* another
* remove tyVarargs
|
|
|
|
|
| |
* rename `endswith` to `endsWith`
* rename
|
| |
|
|
|
| |
* fixes #18565
|