Commit graph

143 commits

Author SHA1 Message Date
ayazhafiz
886e4e07f6 Update alias analysis, implementation for List.mapWithIndex 2022-02-13 22:50:27 -05:00
ayazhafiz
097c5afc73 Check lower bounds for numeric literals, and permit 128-bit literals 2022-02-02 23:35:57 -05:00
Folkert
bec74c36c5 refactor passed (to higher order lowlevel) funcion 2021-11-30 21:50:27 +01:00
Folkert
5b8c63d292 move the heap cell out of the union 2021-11-28 17:51:43 +01:00
Folkert
92cca127b1 refactor 2021-11-28 16:08:11 +01:00
Folkert
8bcb985a80 always also add heap cell to nulled tags 2021-11-28 15:53:05 +01:00
Folkert
537cf69344 add helper for adding a heap cell to values 2021-11-28 15:41:46 +01:00
Folkert
0bdda2506c add update mode to reset and reuse 2021-11-28 14:13:02 +01:00
Folkert
79d5c82dfb cleanup 2021-11-27 16:36:43 +01:00
Folkert
a1fd34feef remove empty layout types (list,str,dict,set) 2021-11-27 14:05:16 +01:00
Folkert
2033f1f430 remove usize in mono 2021-11-21 13:22:45 +01:00
Folkert
c4ec9aa898 working mono 2021-11-20 23:25:30 +01:00
Michael Downey
d946b84e63 adding initial List.all 2021-11-16 16:34:36 -05:00
Folkert
f8b4ce0317 shrink tag id sizes in layouts 2021-11-13 19:31:20 +01:00
Folkert
83953b0bba shrink Call 2021-11-13 15:59:19 +01:00
Folkert
e2f7606f25 shrink higher order with indirection 2021-11-13 15:42:47 +01:00
ayazhafiz
9e50580715 Walk the input list during List.find alias analysis 2021-11-08 22:00:03 -05:00
ayazhafiz
75b439cb31 Remove unnecessary clone 2021-11-08 21:03:15 -05:00
ayazhafiz
731f7a11a1 Remove unused variable 2021-11-08 21:03:15 -05:00
ayazhafiz
f65b174ab5 Implement List.find
`List.find : List elem, (elem -> Bool) -> Result elem [ NotFound ]*`
behaves as follows:

```
>>> List.find [1, 2, 3] (\n -> n > 2)
Ok 2
>>> List.find [1, 2, 3] (\n -> n > 4)
Err NotFound
```

We implement this as builtin in two phases. First, we call out to a
pure-llvm-lowlevel `ListFindUnsafe` that returns a record indicating
whether a satisfying element was found, and the value of that element
(the value is all null bytes if the element wasn't found). Then, we lift
that record to a `Result` via a standard construction of the can AST.

Closes #1909
2021-11-08 21:03:14 -05:00
Kevin Sjöberg
44938a9e35 Implement List.any 2021-11-07 20:44:10 +01:00
Folkert
0ad83fe990 Merge remote-tracking branch 'origin/trunk' into morphic-spec-sortwith 2021-11-01 23:11:52 +01:00
Folkert
89b850983d all higher order lowlevels have morphic specs 2021-11-01 23:05:59 +01:00
Folkert
a36fddd27a morphic for List.map, List.mapWithIndex, List.walk 2021-11-01 21:21:26 +01:00
Folkert
830764221e add specification for sortWith 2021-10-31 22:31:55 +01:00
Kevin Sjöberg
f9ed060e49 Implement List.map4 2021-10-31 21:08:41 +01:00
Folkert
d561f2661d speedups 2021-10-27 00:01:21 +02:00
Folkert
a4f7ddb1f5 rename 2021-10-17 20:45:49 +02:00
Folkert
9763f9b51b WIP 2021-10-17 16:08:41 +02:00
Folkert
94e8c62613 make things compile, base64 has a memory leak 2021-10-06 22:57:11 +02:00
Folkert
0690633116 spec for List.reverse 2021-10-03 13:34:09 +02:00
Folkert
486f1d540f add specifications for fromUtf8 and toUtf8 2021-10-03 13:22:03 +02:00
Folkert
7e6a3431e2 trick morphic into updating a value that comes from the host 2021-10-03 00:07:38 +02:00
Folkert
5a8547f2d4 trick morphic into specializing closure callers 2021-10-03 00:05:17 +02:00
Folkert
f3fae8ea61 alias analysis static list 2021-09-23 23:18:05 +02:00
Brendan Hansknecht
0c6f8f308f Remove f16. It is not really supported by modern CPU hardware. 2021-09-21 16:51:47 -07:00
Folkert
58ee7f0bfc fix argument order bug for mapWithIndex 2021-09-14 22:20:35 +02:00
Folkert
350891468a add LambdaSet layout variant 2021-09-12 17:00:09 +02:00
Folkert
8e7aef314a add ListLiteralElement 2021-09-05 21:23:08 +02:00
Jared Ramirez
4b2a63fb30 Merge branch 'trunk' of https://github.com/rtfeldman/roc into store-dec-as-str 2021-08-26 11:23:17 -07:00
Jared Ramirez
8594f2efbe Change how decimals are stored in mono 2021-08-26 11:18:26 -07:00
Folkert
194918fe4b remove Invoke 2021-08-20 19:32:55 +02:00
Richard Feldman
4c72aba4a7
Merge branch 'trunk' into store-dec-as-str 2021-08-19 23:06:04 -04:00
Jared Ramirez
d69b9173fc Also store f64 for things like pattern comparisons, etc 2021-08-18 17:18:13 -07:00
Folkert
012b4baa2e clippy 2021-08-18 18:33:33 +02:00
Folkert
c09b3b89f3 test_gen works again 2021-08-18 13:46:09 +02:00
Folkert
899cbeabd7 fix extra ampersands 2021-07-29 17:32:08 +02:00
Folkert
48d2f53eb1 create a new heap cell after modification 2021-07-25 12:50:42 +02:00
Folkert
99bab04c1d Merge remote-tracking branch 'origin/trunk' into add-dec-types 2021-07-21 15:18:41 +02:00
Folkert
cb42f0c039 Merge remote-tracking branch 'origin/trunk' into add-dec-types 2021-07-18 16:54:38 +02:00