Commit Graph

3661 Commits

Author SHA1 Message Date
Araq
4f93669754 fixes #11065 2019-04-22 10:11:37 +02:00
Araq
665fcb12dd fixes #11073 2019-04-22 08:05:16 +02:00
Andreas Rumpf
fabc2a7086 revert discardable transformation (#10905)
* Revert "Properly wrap discarded statements (#10322)"

This reverts commit 15584879b9.

* add test for implicit discard after defer
* enable t10241 again
* make C++ tests green again
2019-04-21 09:57:53 +02:00
Andreas Rumpf
0121dda9ba remove the restriction that module names need to be unique per Nimble… (#11064)
* remove the restriction that module names need to be unique per Nimble package

* make tests green again

* use the 'response' linker file also on Unix in order to fix megatest
2019-04-20 15:19:02 +02:00
Andreas Rumpf
44ec66bd48 fixes #11053 2019-04-19 18:02:43 +02:00
Arne Döring
a55817f9ac Fix varargs int32 (#11054)
* fixes #10999
* adds a test for #10999
2019-04-18 20:53:57 +02:00
Araq
7640a230fc fixes #11050 2019-04-17 17:26:59 +02:00
cooldome
7d8af25d58 revert parser stmtListExpr (#11007)
* Revert "Support for stmtListExpr in parser after major keywords. Scaled down version. (#10852)"

This reverts commit 862897dc0f.

* redo fix for #4035

* render stmtlistExpr using semicolon

* Revert "render stmtlistExpr using semicolon"

This reverts commit cafb78b8d5.

* revert test
2019-04-17 11:55:41 +02:00
Miran
43832f8e57 remove shadow warning, fixes #10732 (#11039) 2019-04-17 11:54:51 +02:00
Araq
ce024a73bf make move-analysis smarter; see tuse_ownedref_after_move test case 2019-04-16 10:35:43 +02:00
Araq
045e026d0e dfa.nim: track object/tuple field accesses more precisely; sink(o.x); sink(o.y) needs to compile; activate the tuple unpacking transf.nim bugfix 2019-04-16 10:35:43 +02:00
Andy Davidoff
01f09567c4 faster CountTable sort(), optional SortOrder (#11010)
* use existing sort for CountTable, and
add SortOrder options to CountTable, OrderedTable sort(s)

* add some tests, runnables, etc.

* fix runnable imports
2019-04-16 09:42:54 +02:00
Clyybber
2f56dd6b2b Extend the fix for #11018 to strings (#11031)
* Extend the fix for #11018 to strings

* Fix testcase
2019-04-15 17:06:31 +02:00
Araq
a517a9985b fixes another regression; the behaviour of 'array' formatting was changed 2019-04-15 08:20:28 +02:00
Araq
59ccaa43c7 fixes #11012 2019-04-15 08:20:28 +02:00
Clyybber
499fa3f3dc Fixes #11018 (#11019) 2019-04-14 23:34:19 +02:00
cooldome
fdc3f54f97 fix reraise (#11017) 2019-04-13 10:50:30 +02:00
Araq
572735bbfa fixes #11004 2019-04-12 13:28:12 +02:00
cooldome
041d15392a Compiler plugin for implementing incremental computation in user space (#10819)
This plugin provides essential building block for implementing incremental computations in your programs. The idea behind incremental computations is that if you do the same calculation multiple times but with slightly different inputs you don't have to recompute everything from scratch. Also you don't want to adopt special algorithms either, you would like to write your code in standard from scratch manner and get incrementality for free when it is possible.

The plugin computes the digest of the proc bodies, recursively hashing all called procs as well . Such digest with the digest of the argument values gives a good "name" for the result. Terminology loosely follows paper "Incremental Computation with Names" link below. It works well if you have no side effects in your computations. If you have global state in your computations then you will need problem specific workarounds to represent global state in set of "names" . SideEffect tracking in Nim also useful in this topic.

Classical examples:

Dashboard with ticking data. New data arrives non stop and you would like to update the dashboard recomputing only changed outputs.
Excel spreadsheet where user changes one cell and you would like to recompute all cells that are affected by the change, but do not want to recompute every cell in the spreadsheet.
2019-04-11 23:09:11 +02:00
cooldome
de02fd0b89 fixes #10765 (#10993) [backport] 2019-04-11 13:51:51 +02:00
Araq
2846156e13 newruntime: raising an exception works but currently leaks memory because currentException global is not an 'owned' ref 2019-04-10 20:34:00 +02:00
Araq
cb4e04d88e enable more tests 2019-04-10 20:34:00 +02:00
Miran
1494d88fa2 rst: parse brackets individually, fixes #10475 (#10997) 2019-04-10 15:55:57 +02:00
Araq
bc50795d9c enable most tnewruntime_strutils tests 2019-04-10 15:49:04 +02:00
Araq
a34ce2714a newruntime: fixes another bug 2019-04-10 13:53:47 +02:00
Araq
6e6a9a721f destructors: we are cooking now 2019-04-06 17:32:53 +02:00
Alexander Ivanov
f101f09256 Fix astdef typ deref (#10245) 2019-04-05 16:43:36 +02:00
Arne Döring
3a5a0f6d46 Strformat symbol binding (#10927) 2019-04-05 15:27:04 +02:00
cooldome
e749fc08e7 fixes #10943 (#10947) 2019-04-05 14:50:57 +02:00
Andreas Rumpf
efeee326f8 destructors: progress 2019-04-05 12:38:30 +02:00
cooldome
795de374fb fixes destructor tuple regression #10940 (#10941)
* fixes #10940

* bug fixes

* fix spacing
2019-04-04 20:46:02 +01:00
Arne Döring
65ee80e50c Pure ref object; fixes #10721 (#10955) 2019-04-04 09:06:12 +02:00
cooldome
dc2986789b fixes #10942. Lent T bug (#10946)
* fixes #10942

* add test

* bug build
2019-04-03 15:55:53 +02:00
cooldome
734da9544d fixes #10948 (#10949) 2019-04-03 10:42:41 +02:00
Araq
0b96b135f8 simple program works with --newruntime 2019-04-02 10:43:11 +02:00
Araq
f5a7a3bee9 make megatest work again 2019-04-02 08:23:13 +02:00
Andreas Rumpf
f8e720fda9 fixes json.nim regression 2019-03-29 08:01:59 +01:00
Andreas Rumpf
8e1c6e2e2d fixes #10896 (#10903) 2019-03-25 19:26:38 +01:00
Andreas Rumpf
0cc6e12425 fixes #8202 (#10888)
* fixes #8202

* make tests green
2019-03-23 14:49:21 +01:00
Viktor Kirilov
f8146dfd84 improvements on the hot code reloading support (#10892)
* calling the "_actual" versions of functions when defined within the same module - slowdown for the snappy compression is now down from x6 to x4-x5 when HCR is ON
* dynamically linking to the runtime for VS when HCR is on - binaries are smaller
* compilerProcs are also called using the _actual direct version within the module they are defined (system)!
* updated comments & goals
* handling VS-compatible compilers on Windows in a cleaner way
* now the .dll/.so files end up in the nimcache even when --nimcache isn't explicitly stated
2019-03-23 14:48:47 +01:00
Andreas Rumpf
0b2a3f6f7f fixes #10886 [backport] (#10897) 2019-03-23 14:44:53 +01: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
Arne Döring
3794338aba Lineinfo fix (#10871) 2019-03-21 06:54:42 +01:00
cooldome
28a926cb67 fixes #10861 (#10877) 2019-03-21 06:48:54 +01:00
Arne Döring
389b140029 add tastspec (and ast_pattern_matching) (#10863) 2019-03-19 11:45:29 +01:00
Arne Döring
188870648a sizeof alignof offsetof macros api (#10855) 2019-03-19 08:23:00 +01:00
Arne Döring
97c3b113a5 Size ptr tuple (#10846)
* fixes #10117
* Add support for recursive tuples
* detect in generics
2019-03-18 11:37:09 +01:00
cooldome
862897dc0f Support for stmtListExpr in parser after major keywords. Scaled down version. (#10852)
* Support for stmtListExpr in parser after major keywords
* fixes #4035
2019-03-18 11:09:49 +01:00
cooldome
c19cd14fc9 fixes #10838 (#10841)
* fixes #10838
* reject func in types instead
* trigger tests
2019-03-18 11:04:01 +01:00
Miran
afeca3d9fe multi-methods need to be explicitly enabled (#10856)
* multi-methods need to be explicitly enabled

* update changelog, manual and tutorial
2019-03-18 08:21:37 +01:00