Commit Graph

18 Commits

Author SHA1 Message Date
Erik Svedäng
6f7aeaff73
feat: 'delete' interface (deciding whether a type is managed or not) (#1061)
* feat: 'delete' interface (deciding whether a type is managed or not)

* refactor: Move implements function to Interface module

* feat: Automatically implement 'delete' for types defined with `deftype`

* fix: Don't implement `delete` for Pointer

* refactor: Clarify `memberInfo` function

* fix: Also check if function types are managed

* fix: Implement 'delete' for String and StaticArray.

* fix: Manage String and Pattern. Tests run!

* feat: Add `managed?` primitive

* docs: Note about primitiveIsManaged

* test: Basic test cases for managed / nonmanaged external types

* test: Make sure `managed?` primitive works

* test: Inactivate sanitizer since we're creating leaks intentionally

* feat: Removed 'isExternalType' function

* refactor: Decide if struct member takes ref or not when printing

..based on blitable interface, and 'prn' implemntation

* refactor: Use 'blit' everywhere

* refactor: Implement `strTakesRefOrNot` in terms of `memberStrCallingConvention`

* refactor: Use `remove` over `filter not`
2020-12-20 21:21:14 +01:00
GrayJack
07def7db23 Fix all nth usage 2019-10-31 06:23:23 -03:00
Erik Svedäng
5ad6e94579 The '(load)' command will work relative to the file containing it, if
put into a file.
2019-03-22 20:33:06 +01:00
hellerve
ca22bfc8cd test: use deftest everywhere 2018-11-08 07:16:52 +01:00
Craig Roy
92501770e6 Print results as part of test macro 2018-09-13 00:13:03 +01:00
hellerve
671116e59c core: remove statistics.sum 2018-06-11 21:35:25 +02:00
Chris Hall
7c1dd210d7 Renaming: String.count -> String.length, Array.count -> Array.length
Issue #236
2018-05-23 10:03:42 +10:00
Erik Svedäng
26887f3716 Changed type signature of (set! ...) form. 2018-02-02 07:19:10 +01:00
Erik Svedäng
8281dfa109 Made inc, dec, max, min into interfaces. Changed Array.max/min to new
names. Fixed tests and removed special max/min from Statistics module.
2018-01-29 07:14:56 +01:00
Erik Svedäng
936dd8b26c Changed type of member getter method to always returning a Ref (used to be non-ref for primitive types). 2018-01-26 21:23:29 +01:00
hellerve
9e60ff01c1 core: fixed statistics cond and tests; core: accurate error message on cond 2017-12-15 17:43:06 +01:00
hellerve
5704a9268c macros: added use-all 2017-12-12 15:08:33 +01:00
hellerve
89eb010045 tests: simplified 2017-11-27 14:45:14 +01:00
Erik Svedäng
7b5a0aa7eb All tests run, but can still confuse the type checker, see "expression_problem.carp" 2017-11-27 12:36:17 +01:00
Erik Svedäng
6f5066f3fd If an interface is defined, all references to it will become MultiSym:s (for now). 2017-11-23 07:42:52 +01:00
Erik Svedäng
db8ab73644 Removed autoloading of the more advanced libraries, requires manual loading. 2017-11-21 12:01:31 +01:00
hellerve
e3a0da969a statistics: updated tests 2017-11-07 15:06:47 +01:00
hellerve
54592f5e4c statistics: added tests 2017-10-26 17:55:10 +02:00