Commit Graph

164 Commits

Author SHA1 Message Date
Timothee Cour
86298e30d9 [backport => 1.0] fix #16428 vmops now works for generic procs (#16429)
* fix #16428 vmops now works for generic procs

* remove duplication

(cherry picked from commit bc84d9c8cb)
2021-02-01 15:33:25 +01:00
narimiran
0ca09f64cf disable tmitems_vm test on cpp target 2020-10-26 14:25:28 +01:00
narimiran
fec5d04afc increase timeout for 'tslow_tables' even more 2020-04-23 18:53:36 +02:00
narimiran
50de7732ed increase timeout for 'tslow_tables' 2020-04-21 11:16:28 +02:00
cooldome
4028514eeb fixes #13013, reverts previous changes to readLines() (#13036) [backport]
* Revert "remove default argument for readLines (#12807) [backport]"

This reverts commit c949b81efd.

(cherry picked from commit a3df1b55f3)
2020-01-05 10:40:13 +01:00
cooldome
78f9933b8f remove default argument for readLines (#12807) [backport]
(cherry picked from commit c949b81efd)
2020-01-05 10:39:55 +01:00
Araq
299f1e99cd fixes #12488 [backport]
(cherry picked from commit 87f0d534d6)
2019-12-10 16:00:20 +01:00
Andreas Rumpf
7d444ff04c fixes #12670 [backport] (#12693)
(cherry picked from commit 78e02d174d)
2019-11-21 17:27:50 +01:00
Andreas Rumpf
0b134412f8 fixes #12310 [backport] (#12470)
(cherry picked from commit 38b3590e40)
2019-10-21 07:32:38 +02:00
Araq
535f0b9c9d fixes #12244 [backport]
(cherry picked from commit 7f904e2c66)
2019-10-12 08:00:43 +02:00
Federico Ceratto
fa7f5742d3 Fix spellings (#12277) [backport]
(cherry picked from commit 39290cf88c)
2019-09-30 18:43:35 +02:00
Andreas Rumpf
162d74db91 fixes #10981; fixes #7261 (#12217) 2019-09-19 14:34:56 +02:00
Arne Döring
638a4d9d9f rename cast opcodes, fix for 32bit cast, fix python pretty printer (#12207) 2019-09-18 09:04:37 +02:00
Araq
ea8a049af3 fixes the testcase 2019-09-17 15:15:12 +02:00
Araq
c9f3a8b269 added a testcase for #12195; testament now supports a 'timeout' spec field 2019-09-17 15:15:12 +02:00
Andreas Rumpf
a5e2db2ac5 allows access to .compileTime vars at runtime (#12128) 2019-09-05 11:56:32 +02:00
Andreas Rumpf
d70e292571 makes more tests green 2019-09-02 22:03:06 +02:00
Araq
18ca1788f0 makes test green again 2019-09-02 14:23:05 +02:00
Arne Döring
6e01be34ef fixes #11903 (#11908) 2019-08-31 19:32:59 +02:00
Arne Döring
afbcd1b330 int128 on firstOrd, lastOrd and lengthOrd (#11701)
* fixes #11847
2019-08-07 15:53:16 +02:00
Arne Döring
b73d097d36 fixes #9829 (#11849) 2019-08-04 19:31:55 +02:00
Oscar Nihlgård
50e921bb94 VM exception fixes (#11868) 2019-08-02 22:59:04 +01:00
Oscar Nihlgård
829f719670 Fix VM conversion to var type [bugfix] (#11866) 2019-08-01 17:44:12 +02:00
Andreas Rumpf
2895ad70c8 fixes tcompiletimerange [bugfix] (#11720) 2019-07-12 15:37:54 +02:00
Araq
7606efc0bf [bugfix] VM: finally do inheritance properly 2019-07-12 12:15:30 +02:00
Andreas Rumpf
28c9c062a4 fixes #11610 (#11659) 2019-07-05 07:26:06 +02:00
Arne Döring
94177f7357 VM can now cast integer type arbitrarily. (#11459) [feature] 2019-06-10 19:58:11 +02:00
Araq
f844891e48 make megatest work with 'koch boot -d:release' too 2019-06-05 22:32:19 +02:00
Andreas Rumpf
7215341190 make fullpaths the default in error messages and stack traces for mor… (#11385)
* make fullpaths the default in error messages and stack traces for more convenient development
* split up -d:release into -d:release and -d:danger flags
* workaround a Nim config parser bug
* fixes an old nim config parser bug
* make megatest green again
* make nimpretty tests work again
* make nimsuggest green
2019-06-05 08:02:54 +02:00
narimiran
a8939686a1 close #8199 by adding a test 2019-05-29 14:47:45 +02:00
narimiran
379916c737 make tests green 2019-05-28 07:31:25 +02:00
narimiran
0fc42fc4f7 tableinstatic test: make it arch-independed 2019-05-27 21:41:24 +02:00
Arne Döring
f94ec363ab Allow void macro result (#11286)
* allow void macro result
* add test for void macro result type
2019-05-21 21:31:40 +02:00
Aditya Siram
cc2be5e4c6 Fixes #11045. Assigning a proc to const and invoking. (#11076) 2019-05-04 22:57:15 +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
Andreas Rumpf
0b2a3f6f7f fixes #10886 [backport] (#10897) 2019-03-23 14:44:53 +01:00
Andreas Rumpf
142a2d3551 added system.default in order to prevent the abstraction inversion that 'template default(T): untyped = (var x: T; x)' causes 2019-03-05 09:54:59 +01:00
Andreas Rumpf
c5dbb0379f disable compile-time FFI support 2019-02-23 11:34:39 +01:00
Timothee Cour
adbabf145c FFI at CT (#10150)
* enable FFI at CT
* rename useFFI=>nimHasLibFFI; improve formatting rawExecute traceCode
* disable libffi on windows (works for win32, not yet win64)
2019-02-23 11:31:01 +01:00
Arne Döring
28394153ab 32 bit fixes (#10608) 2019-02-13 23:30:14 +01:00
LemonBoy
710cfcecd3 Rework exception handling in the VM (#10544)
* 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
2019-02-08 11:57:47 +01:00
Arne Döring
b80dbdb77d Fix vm signed xor (#10519)
* fix #10482

* undo changes

* fix for bitwise not

* remove dead opcode
2019-02-01 12:12:10 +01:00
cooldome
1d5437e9d2 vm fix for bitwise signed ints (#10507)
* fixes #10482

* add missing file

* bug fix
2019-01-31 19:48:39 +01:00
LemonBoy
9c0e5c4c07 Harmonize the var/let and const handling (#10410)
Fixes #10333
2019-01-23 11:10:51 +01:00
Neelesh Chandola
226c15499f Fix compileTime pragma applying to whole var/let section (#10389) 2019-01-22 07:55:11 +01:00
LemonBoy
44c04b3571 Object downconversion in VM should not copy (#10378)
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
2019-01-22 07:36:40 +01:00
Oscar Nihlgård
a4cdd25b19 Support system.reset in vm (#10400) 2019-01-21 17:00:33 +01:00
Timothee Cour
6ce3949c8a add isNamedTuple; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) which leaked implementation detail (#10070)
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2)
  fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim

* Note: isNamedTuple is useful in other places, eg #10010 (comment)

* move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim

* remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
2019-01-08 18:37:25 -08:00
deech
e87910197a Check there are no side effects before optimizing away compile time expressions. (#9934) 2018-12-31 14:41:24 +01:00
Timothee Cour
c4e3c4ca2d add getCurrentCompilerExe to vmops (eg allows to get nim compiler at CT); add tests for vmops (#9925) 2018-12-18 09:07:12 +01:00