Commit Graph

91 Commits

Author SHA1 Message Date
Juan M Gómez
49a108b302 Expands codegenDecl to work in function params. fixes #22306 (#22307)
* Expands codegenDecl to work in function params. fixes #22306

* makes the test more concrete so T{lit} params dont match

* adds sfCodegenDecl
2023-07-23 16:42:20 +02:00
Juan M Gómez
50d435cd39 Fixes Naive virtual crash the compiler fixes #22269 (#22271)
* Fixes Naive virtual crash the compiler fixes #22269

* adds type specific test
2023-07-16 17:01:34 +02:00
Juan M Gómez
e43a51fcf3 Implements: [C++] constructor pragma improvement (fix #21921) (#21916)
* implements: [C++] constructor pragma improvement (fix #21921)

t

* fix test so it doesnt use echo in globals

* Update compiler/ccgtypes.nim

* Update lib/std/private/dragonbox.nim

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-05-30 21:47:26 +02:00
Juan M Gómez
c7f2541914 actually fixes #21889 "constructor pragma doing nothing in globals" (#21897)
actually fixes #21889
2023-05-24 16:42:53 +02:00
Juan M Gómez
44f059c75e implements allow byref to work in params #21873 (#21875) 2023-05-21 00:19:09 +02:00
Juan M Gómez
02a10ec379 Cpp Vfunctions draft (#21790)
* introduces virtual pragma, modifies proc def, prevents proc decl

* marks virtual procs as infix

* forward declare vfuncs inside the typedef

* adds naked callConv to virtual

* virtual proc error if not defined in the same top level scope as the type

* first param is now this. extracts genvirtualheaderproc

* WIP syntax

* supports obj. Removes the need for the prefix

* parameter count starts as this. Cleanup

* clean up

* sem tests

* adds integration tests

* uses constraint to store the virtual content

* introduces genVirtualProcParams

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-05-17 11:44:42 +02:00
ringabout
1431f90d8c Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the default definition would be ill-formed " (#21307)
Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the default definition would be ill-formed  (#21169)"

This reverts commit a7bae919ad.
2023-01-27 21:41:59 +01:00
Bung
a7bae919ad Fix #13093 C++ Atomics: operator= is implicitly deleted because the default definition would be ill-formed (#21169)
* add test

* fix #17982 Invalid C++ code generation when returning discardable var T

* fix #13093

* cpp atomic good example

* clearify the condition
2023-01-27 09:50:44 +01:00
ringabout
0ffc322cf6 add the cpp target (#21164)
The issue is related to cpp codegen, the previous test doesn't test cpp backend, which will join into the megatest.
2022-12-23 22:31:53 +08:00
Bung
13251c2ac9 fix #12946 Bad C++ codegen on distinct generics C++ types (#21157) 2022-12-23 09:47:01 +01:00
ringabout
b981f3eeb7 ship a modern nimble with lock files support (#21061)
* change `include genode/env` to an import 

ref 0b262e9496 (diff-8718bd20d8f61d6638d3d64b19efc31bcd40a6d5be8215b2a1f0b75ed93e8d56)

* fixes comments

* ship a modern nimble with lock files support

* not sure whether the latest nimble has a regression

now I'm trying  0.14.0

* change `pkgs` to `pkgs2` (#21073)

* overwrite problematic packages

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review
2022-12-12 07:25:39 +01:00
ringabout
6d8178a93e closes #4678; add testcase (#20634) 2022-10-24 09:26:07 +08:00
metagn
919a889ba8 moderate system cleanup & refactor (#20355)
* system refactor, move out 600 lines

* compilation, slice, backwardsindex, misc_num moved out of system
* some procs/types moved into arithmetics, basic_types
* system no longer depends on syncio
* some procs moved around to fit with their surroundings

* make exceptions an import, old ops to misc_num

* move instantiationInfo back

* move back nim version, fix windows echo

* include compilation

* better docs for imported modules, fix unsigned ops

also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem

* fix terminal

* workaround IC test & weird csize bug, changelog

* move NimMajor etc back to compilation, rebase for CI

* try ic fix

* form single `indices`, slim out TaintedString, try fix IC

* fix CI, update changelog, addQuitProc

* fix CI

* try fix CI

* actually fix CI finally hopefully

* Update lib/system/compilation.nim

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>

* update kochdocs

* hopefully fix csize uses for slimsystem

* fix tquit

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
2022-09-28 15:28:45 -04:00
ringabout
47b59e4d33 fix #17351; switch to c++17 and remove hacks (#20407)
* fix #17351; switch to c++17

* remove workaround
2022-09-23 11:16:43 +02:00
metagn
86f7f4ffa5 remove deprecated type pragma syntax, fix bugs that required it (#20199)
* remove deprecated pragma syntax from 0.20.0

closes #4651, closes #16653 with a cheap fix for now due to
how early `tfFinal` is set

* remove type pragma between name and generics

* undo removal, try removing bind expression (0.8.14)

* fix test, unremove bind expr

* remove again

* Update changelog.md

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* dependencies @ HEAD & weave test dependencies

* try fix package ci

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-09-03 09:52:13 +02:00
flywind
891329cd4b move io out of system (#19442)
* move io out of system

* fix tests

* fix tests

* next step

* rename to syncio

* rename

* fix nimscript

* comma

* fix

* fix parts of errors

* good for now

* fix test
2022-02-02 17:10:11 +01:00
flywind
9df195ef58 style usages part one (openarray => openArray) (#19321)
* style usages (openArray)

* revert doc changes
2022-01-04 13:29:50 +01:00
flywind
2f730afe9e fix #18410 (Errors initializing an object of RootObj with the C++ backend) [backport] (#18836)
* fix #18410

* one line comment

* typo

* typo

* cover cpp
2021-10-31 06:22:00 +01:00
Timothee Cour
2ce592a209 refs #18011 disable some newly failing tests on cpp windows; refs #17946 increase timeout for tchannels (#18012) 2021-05-14 15:33:17 -07:00
Andreas Rumpf
fb86271556 system.nim cleanup some exported constants which should never have be… (#17909)
* system.nim cleanup some exported constants which should never have been exported
2021-05-01 11:10:40 +02:00
Timothee Cour
6c5872c169 --nilseqs is now a deprecated noop (#17211)
* --nilseqs is now a deprecated noop

* fix tests; fix: future => sugar
2021-03-01 20:59:43 +01:00
Timothee Cour
5d95137ce0 remove tests/deps/ (#17132)
* remove tests/deps/

* fix tests

* fix tests/manyloc/keineschweine/lib/zlib_helpers.nim

* fixup
2021-02-23 13:31:53 +01:00
flywind
dbff2cd938 close #4834 add testcase (#16649) 2021-01-09 11:54:26 +01:00
flywind
732419ae90 improve examples in manual (#16497)
* improve examples in manual

* Update doc/manual.rst

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update tests/cpp/ttemplatetype.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-12-29 13:44:48 +01:00
Timothee Cour
7e1ae35195 testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY (#16343)
* testament: error instead of silently ignore invalid targets
* s/target/targets/
* fix test; refs #16344
* address comments
* Update testament/specs.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-12-14 10:58:29 +01:00
flywind
e4d0f9f3de typeinfo minor improvement (#16083)
* typeinfo minor improvement

* minor

* Update lib/core/typeinfo.nim

* rename typeinfo
2020-11-23 22:56:30 +01:00
Arne Döring
142c59fc37 fix typos and deprecation warnings for tconvariancerules.nim (#13772) 2020-03-27 08:36:21 +01:00
cooldome
b3176b8817 Attempt to finish off araq cpp exceptions (#13695)
* config update
* disable a questionable test
* remove c++ exception handling IDs, new impl doesn't require it anymore
* C++ based exceptions finally work
* fixes bootstrapping problem in C++ mode
* teach GCC it's 2020 now
* more bugfixes for C++ based exception handling
* apply cooldome's patch
* another attempt to enable C++11
* bug fix

Co-authored-by: Araq <rumpf_a@web.de>
Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-03-19 20:38:25 +01:00
Jasper Jenkins
6a23452bf4 fix sets of scoped imported enums (#13666) 2020-03-17 10:47:27 +01:00
Araq
80b508d337 test suite: rename tests containing 'fail' for easier search in logs 2019-11-26 16:04:28 +01:00
Arne Döring
99078d80d7 introduce csize_t instead of fixing csize (#12497) 2019-10-31 19:18:12 +01:00
Federico Ceratto
39290cf88c Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
Jasper Jenkins
ca7bf3be8b no commas for empty importcpp splat params (#12183) 2019-09-12 08:19:53 +02:00
Timothee Cour
32769c478b exportc now mangles same as importc, fixes #10578 (#12144)
* fixes #10578
* add tests
* add changelog
* add {.exportcpp.}
2019-09-06 12:54:44 +02:00
Andrii Riabushenko
7cfc7cfb26 fixes #11118 2019-04-30 21:46:45 +01:00
cooldome
de02fd0b89 fixes #10765 (#10993) [backport] 2019-04-11 13:51:51 +02:00
cooldome
734da9544d fixes #10948 (#10949) 2019-04-03 10:42:41 +02:00
Andreas Rumpf
0cc6e12425 fixes #8202 (#10888)
* fixes #8202

* make tests green
2019-03-23 14:49:21 +01:00
LemonBoy
15584879b9 Properly wrap discarded statements (#10322)
Failing to do so lead the codegen to emit invalid code sometimes,
especially when C++ references were involved.

Fixes #10241
2019-01-17 07:55:29 +01:00
cooldome
7c90e22ddd fixes #10148 (#10149)
* fixes #10148
* fix a typo
2018-12-31 22:57:09 +01:00
Arne Döring
a29ec40032 join simple test 2018-11-23 11:58:32 +01:00
Arne Döring
9c2365d5c2 activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
Arne Döring
e012eb1001 updated tests to be executed 2018-11-23 11:58:28 +01:00
cooldome
9b9f5dee0b Fixes discard bug in cpp codegen (#9747) [backport]
Fixes discard bug in cpp codegen
2018-11-19 08:44:49 +01:00
Araq
432a4d1787 fixes #5549 2018-10-30 15:30:33 +01:00
narimiran
f4149ae535 Closes #6986 2018-10-28 11:30:41 +01:00
cooldome
036c52f0b6 fixes #9222 (#9224) 2018-10-09 15:19:21 +02:00
LemonBoy
334032294f Fix linking issue in cpp codegen
Declare the root symbol only once and have the other modules depending
on it emit an `extern` declaration.

Fixes #9013
2018-09-19 12:46:50 +02:00
Araq
d2208091fa disable Nimble dependencies for appveyor 2018-09-14 09:45:03 +02:00
Araq
f91a181f58 make tests green again 2018-08-13 23:16:03 +02:00