* Rework exception handling in the VM
Make the safepoint handling more precise and less forgiving.
The new code is clearer and more commented.
Perform cleanup on `return`.
The no-exception-thrown case in a try block should be slightly faster
since we don't parse the whole set of exceptions every time.
More tests.
* Fix silly error that broke a few tests
* Testament doesn't like files having the same name
* Remove test case that failed compilation to js
* move IO subsystem into its own module; refs #10385
* make standalone test compile again
* make C++ examples compile again
* make more tests green
* make sysAssert and gcAssert work again
This allows spaces in imports, by using the following syntax:
* `import "directory with spaces" / subdir / file`, or
* `import "directory with spaces/subdir/file"`
* kochdocs.nim: code cleanup
* docgen: nicer indentation
* parser.nim: code cleanup
* fixes#10458
* make tests green again
* make =destroy mixins
* gc:destructors: produced C code is almost working
* --gc:destructors simple program compiles (but leaks memory)
* gc:destructors make examples compile in C++ mode
* destructors: string implementation bugfixes
* strs.nim: minor code cleanup
* destructors: builtin seqs are beginning to work
* remove debugging helpers
* fix#10339 by checking for nkObjConstr
* revert check for nkObjConstr, return type from nkEmpty node
The correct type needed in `semObjConstr` to fix#10339 is indeed
available, but attached to an `nkEmpty` node. These were previously
discarded in `semTypeNode`, which is used to extract the type for the
object.
* simplify return of PType from `nkEmpty`
* also fixes#9866, add test case
Hopefully the type-check phase already rejected all the invalid
conversions by the time we execute the VM bytecode.
Problem reported by chrisheller on the Nim Forum
The type matching is done on the `T` of the `varargs[T]` so the
conversion must be performed to `T` and not to the whole type.
This problem is only noticeable with the cpp backend since C doesn't
give a damn shit about your fucking (wrong) types.
Fixes#9845