Commit Graph

738 Commits

Author SHA1 Message Date
Richard Feldman
9e70fceb33 Wrote a bunch of string docs 2020-05-11 23:43:30 -04:00
Richard Feldman
c752d1607a Update Float to mention binary and decimal floats 2020-05-11 23:43:30 -04:00
Richard Feldman
101e90e437 Go back to Float 2020-05-11 23:43:30 -04:00
Richard Feldman
045f1627a0 Try Real 2020-05-11 23:43:30 -04:00
Richard Feldman
1a348d1731 Write some docs 2020-05-11 23:38:18 -04:00
Richard Feldman
b5e4066c49 clippy clop 2020-05-10 15:22:05 -04:00
Richard Feldman
33a5f36d7c Refactor out name arg from from_can 2020-05-10 15:13:18 -04:00
Richard Feldman
85ec1e0f72 Fix anonymous function code gen 2020-05-10 15:13:18 -04:00
Richard Feldman
bf11262e61 Move layout_id from mono to gen
This is because it's actually important that mono never use this.
It should only be used in gen, because it's only safe to use
synchronously, and it's important that mono be done in parallel.

Moving it to gen guarantees that mono will not use it, even accidentally!
2020-05-10 15:13:18 -04:00
Richard Feldman
bd6228de8b Prevent infinite looping in code gen 2020-05-10 15:13:18 -04:00
Richard Feldman
e26df0d8cb Drop unused ContentHash 2020-05-10 15:13:18 -04:00
Richard Feldman
6e05ba816f Have CallByName use Layout 2020-05-10 15:13:18 -04:00
Richard Feldman
4bfdea03a9 Drop dead code 2020-05-10 09:58:42 -04:00
Richard Feldman
8572879e0d Remove unused procs argument 2020-05-09 22:41:59 -04:00
Richard Feldman
c49abfe2de Add layout to CallByName 2020-05-09 22:41:59 -04:00
Richard Feldman
510ab36f51 Use LayoutCache to avoid recomputing layouts 2020-05-09 22:11:32 -04:00
Richard Feldman
efa486251e Add LayoutCache 2020-05-09 22:11:32 -04:00
Chad Stearns
198716498c Used negate instead of multiplying by -1 for INT_ABS implementation 2020-05-09 21:43:41 -04:00
Chad Stearns
c435cd2a19 increase stack of quicksort test 2020-05-09 21:34:17 -04:00
Chad Stearns
09ef6b2734 Merge branch 'trunk' of github.com:rtfeldman/roc into int-abs 2020-05-09 18:12:29 -04:00
Chad Stearns
dea2fe2382 Moved exiting builtin functions to use defn helper 2020-05-09 18:11:21 -04:00
Chad Stearns
d2cea5237b Remove commented out INT_ABS implementation 2020-05-09 18:01:36 -04:00
Chad Stearns
f5ebdf49e4 More int_abs documentation 2020-05-09 18:01:22 -04:00
Chad Stearns
1d1f620090 Int Abs 2020-05-09 17:56:10 -04:00
Richard Feldman
6a79a75648 Don't regenerate anonymous function symbols 2020-05-09 12:56:55 -04:00
Richard Feldman
ca0b6fde31 Drop unused mono test helper 2020-05-09 09:46:24 -04:00
Richard Feldman
8fbfae5e62 Expand some docs 2020-05-09 09:46:24 -04:00
Chad Stearns
7331e55a25 Cargo fmt 2020-05-08 04:07:07 -04:00
Chad Stearns
8e8412bf94 FLOAT_ABS test, and NUM_ABS generally, but not implemented 2020-05-08 00:49:08 -04:00
Richard Feldman
7e7c6ef4af Drop obsolete symbol_counter field 2020-05-04 20:32:21 -04:00
Richard Feldman
2904f29c36 Have mono::expr::Env use IdentIds::gen_unique 2020-05-04 20:29:36 -04:00
Richard Feldman
ce9e7a91f6 Clean up some Cargo.toml files 2020-05-03 21:37:59 -04:00
Richard Feldman
56cc7c013f Drop obsolete dbg! 2020-05-03 08:51:11 -04:00
Richard Feldman
ff953021d5 Fix parser bug with newline after '=' in def
Fixes #51
2020-05-03 08:50:55 -04:00
Richard Feldman
c856314e13 Reproduce parser bug with newline after '=' in def
See #51
2020-05-03 08:50:32 -04:00
Richard Feldman
20648958eb Revise some future fmt tests 2020-05-03 08:50:21 -04:00
Richard Feldman
2eea57a51a Add some more detail to a todo 2020-05-02 22:19:29 -04:00
Richard Feldman
13dd937a71 Revert "Attempt to add builtin_defs to CLI"
This reverts commit 2679077de9.
2020-05-01 22:00:06 -04:00
Richard Feldman
2679077de9 Attempt to add builtin_defs to CLI 2020-05-01 21:59:38 -04:00
Richard Feldman
101dc80ae5 Move parse::operator into module::operator 2020-05-01 21:58:53 -04:00
Richard Feldman
f47d96e1a4 Update a comment 2020-05-01 21:56:44 -04:00
Richard Feldman
5f33073703 fix tests 2020-05-01 19:30:55 -04:00
Richard Feldman
ee31eac0c5 Code gen toplevel module functions 2020-05-01 19:30:55 -04:00
Richard Feldman
5c31369072 Code gen thunks for top-level module decls 2020-05-01 19:30:55 -04:00
Richard Feldman
072cf4e844 Revert "wip canonical builtins in modules"
This reverts commit e1935a1e9f0c7ea1ffefe5f2f4f07f2c7666363b.
2020-05-01 19:30:55 -04:00
Richard Feldman
a1750567ff wip canonical builtins in modules 2020-05-01 19:30:55 -04:00
Richard Feldman
a70f6cfdb0
Merge branch 'trunk' into int-ne 2020-05-01 18:43:15 -04:00
Chad Stearns
d1b00633be INT NEQ for i1 and i8 integer types 2020-05-01 17:29:43 -04:00
Chad Stearns
4b5f7bfded Changed Int div implementation to use != 2020-05-01 17:29:12 -04:00
Chad Stearns
6b6e6f0eec Changed Int div implementation to use != 2020-05-01 17:17:41 -04:00
Chad Stearns
71258e0e59 Implemented INT_NE_i64 2020-05-01 16:31:19 -04:00
Chad Stearns
51d6530a7f Commented in DivByZero test 2020-05-01 01:52:15 -04:00
Chad Stearns
0518ccc991 Remove INT_DIV from std.rs 2020-04-29 18:22:25 -04:00
Chad Stearns
516f5736c2 Merging in remote trunk 2020-04-29 18:01:55 -04:00
Chad Stearns
9107880928 Implemented generated built in int division, with the return type as a result 2020-04-29 17:36:02 -04:00
Richard Feldman
cea7233b92 Fix some indentation 2020-04-29 07:11:20 -04:00
Richard Feldman
35f99680ba Use indoc! more 2020-04-29 07:10:59 -04:00
Richard Feldman
570f387f0d Drop some obsolete dead_code annotations 2020-04-29 07:05:43 -04:00
Richard Feldman
42a03303ca Add a quicksort test to gen_builtins 2020-04-29 07:05:26 -04:00
Folkert
c11ac52a4b fix num/int bug
we called the function with the wrong type variable. now there are two functions, handling both cases
2020-04-29 12:28:13 +02:00
Richard Feldman
dc49656c34 Add some List.get tests 2020-04-28 19:46:42 -04:00
Richard Feldman
353377c29e Re-enable List.get 2020-04-28 19:46:33 -04:00
Richard Feldman
c39b43a265 Code gen numeric comparisons 2020-04-28 18:33:51 -04:00
Richard Feldman
952e5fa012 clippity clip clippy 2020-04-27 20:35:19 -04:00
Richard Feldman
dfb1c2d8a3 Always store collections as (usize, usize) 2020-04-27 20:05:35 -04:00
Richard Feldman
32d6615108 Attempt to store i8 arrays for collection wrappers
This ultimately didn't work because the bitcasting we wanted wasn't allowed.
2020-04-27 20:04:38 -04:00
Richard Feldman
46bf6f4bee Reproduce List.first failing when given [] 2020-04-27 20:03:55 -04:00
Chad Stearns
10a99a6fc7 Merging in remote 2020-04-26 18:24:31 -04:00
Chad Stearns
0cfed05008 Implemented div unsafe 2020-04-26 18:11:46 -04:00
Chadtech
73da3c3f67
Merge branch 'trunk' into int-div 2020-04-26 14:39:03 -04:00
Chad Stearns
aa72619952 Implemenet code gen for int div 2020-04-26 14:38:09 -04:00
Richard Feldman
1bee16decd Temporarily disable List.get in favor of getUnsafe 2020-04-26 09:37:46 -04:00
Richard Feldman
52a3e0afb5 Don't fail gen tests for unused warnings 2020-04-26 09:33:12 -04:00
Richard Feldman
0c58eeea97 Use List.get instead of List.getUnsafe in tests 2020-04-26 09:33:12 -04:00
Richard Feldman
ac6e98361e Drop obsolete List.get hardcoded type 2020-04-26 09:33:08 -04:00
Richard Feldman
b7862f1dc1 Drop obsolete test 2020-04-26 09:10:40 -04:00
Richard Feldman
d4b1c7e68a Eagerly report more problems 2020-04-26 09:04:27 -04:00
Richard Feldman
a2e6c4ba12 Restore some things 2020-04-26 08:59:52 -04:00
Richard Feldman
511c7b7a21 Revise some builtins tests 2020-04-26 08:55:54 -04:00
Richard Feldman
9cc9789738 Merge remote-tracking branch 'origin/trunk' into list-get 2020-04-26 08:46:24 -04:00
Richard Feldman
310595c108 Revert "Only add builtins if they're referenced"
This reverts commit 8e9b02560e9b172def0e915631e1d116c64859f2.
2020-04-26 08:45:47 -04:00
Richard Feldman
d2a9d24626 Only add builtins if they're referenced 2020-04-26 08:45:47 -04:00
Richard Feldman
afbe871e6d wip 2020-04-26 08:45:41 -04:00
Folkert
cd4c28ca0c fix failing tests 2020-04-25 21:12:49 +02:00
Richard Feldman
d0c9c433a6 Have List.first return Err ListWasEmpty 2020-04-25 07:57:41 -04:00
Richard Feldman
75d46053ec Drop unused unique::result_type function 2020-04-25 07:53:30 -04:00
Richard Feldman
24ff91b45a Add a List.first test 2020-04-25 07:52:43 -04:00
Richard Feldman
e78b126207 Give List.first the right name 2020-04-25 07:51:56 -04:00
Richard Feldman
a399614824 Use helpers in can builtins 2020-04-25 07:51:45 -04:00
Richard Feldman
a0512a5f97 Add some List.len and List.isEmpty tests 2020-04-25 07:05:19 -04:00
Richard Feldman
d6a5cc14b6 Fix a comment 2020-04-25 07:05:19 -04:00
Richard Feldman
bac940e116 Fix hardcoded List.isEmpty type 2020-04-25 07:05:18 -04:00
Richard Feldman
d0da4bf926 Remove obsolete hardcoded List.get types 2020-04-25 07:03:33 -04:00
Richard Feldman
034f1c916a Load canonical builtins in gen tests 2020-04-25 07:01:30 -04:00
Richard Feldman
b77b3bda14 Add some List.len and List.isEmpty tests 2020-04-25 07:01:02 -04:00
Richard Feldman
d6d453d120 Add a TODO comment 2020-04-25 07:00:44 -04:00
Richard Feldman
5a22348f35 Fix a comment 2020-04-25 07:00:34 -04:00
Richard Feldman
9dd9b7951d Fix hardcoded List.isEmpty type 2020-04-25 07:00:24 -04:00
Richard Feldman
243bbf4790 Revert changes to mono/ from List.get attempts 2020-04-25 06:30:01 -04:00
Richard Feldman
bff89e7e2e Remove DEFAULT_CALLING_CONVENTION 2020-04-25 06:30:01 -04:00
Richard Feldman
b43e582c7a Add intrinsics for sqrt and round 2020-04-25 06:30:01 -04:00
Folkert
0191910715 fix clippy's newly-learned warnings 2020-04-25 06:30:01 -04:00
Folkert
0a1cf805f9 handle Unboxed 2020-04-25 06:30:01 -04:00
Folkert
3e36bea700 improve formatting of records in pattern exhaustiveness errors 2020-04-25 06:30:01 -04:00
Folkert
8284575a47 fix formatting of ctor patterns in errors 2020-04-25 06:30:01 -04:00
Folkert
dc320e9fd9 fix ordering bug in pattern exhaustiveness 2020-04-25 06:30:01 -04:00
Folkert
f8b540b6f4 use tag id instead of name in exhaustiveness checking 2020-04-25 06:30:01 -04:00
Richard Feldman
07001131b2 Add can::builtins 2020-04-25 06:30:01 -04:00
Richard Feldman
6b952e0c98 Revert "Attempt to add List.get to mono/"
This reverts commit 49d24e8202cf59d0b47ca397fe0c150d0620da20.
2020-04-25 06:19:13 -04:00
Richard Feldman
c28f00ecb2 Attempt to add List.get to mono/ 2020-04-25 06:19:13 -04:00
Richard Feldman
d97e16de7e Revert "Attempt a mono/ approach for List.get"
This reverts commit f0b76f41da.
2020-04-25 06:19:10 -04:00
Richard Feldman
f0b76f41da Attempt a mono/ approach for List.get 2020-04-25 06:19:06 -04:00
Richard Feldman
aac5077c8b Remove DEFAULT_CALLING_CONVENTION 2020-04-23 17:41:05 -04:00
Richard Feldman
5b7a16afad Add intrinsics for sqrt and round 2020-04-23 17:41:05 -04:00
Folkert
81769b4e65 fix clippy's newly-learned warnings 2020-04-23 22:12:24 +02:00
Folkert
b433988fde Merge remote-tracking branch 'origin/trunk' into pattern-exhaustiveness-records 2020-04-23 21:57:09 +02:00
Folkert
4530aa8c07 handle Unboxed 2020-04-23 21:55:21 +02:00
Folkert
848764cb25 improve formatting of records in pattern exhaustiveness errors 2020-04-23 21:49:24 +02:00
Folkert
c54d61c854 fix formatting of ctor patterns in errors 2020-04-23 20:30:42 +02:00
Folkert
b2a713915b fix ordering bug in pattern exhaustiveness 2020-04-23 20:12:40 +02:00
Richard Feldman
5992b42ebe Remove unnecessary conditionals 2020-04-22 23:35:57 -04:00
Richard Feldman
04ec592eeb Revert "Thread ret_layout through CallByName"
This reverts commit 632d4eca92.
2020-04-22 08:33:53 -04:00
Richard Feldman
a1b670d2a5 Revert "Extract build_tag"
This reverts commit e998a31cf9.
2020-04-22 08:33:26 -04:00
Richard Feldman
9d37f7ae73 s/IndexOutOfBounds/OutOfBounds/g 2020-04-22 08:32:31 -04:00
Richard Feldman
632d4eca92 Thread ret_layout through CallByName 2020-04-22 08:30:41 -04:00
Richard Feldman
c450a67421 Add some tag code gen tests 2020-04-22 08:30:41 -04:00
Richard Feldman
e998a31cf9 Extract build_tag 2020-04-22 08:30:41 -04:00
Chad Stearns
5ca1174f78 Another when condition test 2020-04-21 23:49:26 -04:00
Chad Stearns
73744b3b1d Merge branch 'trunk' of github.com:rtfeldman/roc into format-precedence-conflict 2020-04-21 23:40:13 -04:00
Chad Stearns
8e86146963 Lots of new tests. Lots of commented-in tests. Tests that had a lot of assertions broken out into separate tests 2020-04-21 23:40:08 -04:00
Chad Stearns
ffdce07d29 fixed formatting error for if statement formatting 2020-04-21 23:39:22 -04:00
Chad Stearns
c3d296a026 fixed formatting error for when formatting 2020-04-21 23:38:04 -04:00
Chad Stearns
ac85f86b9e Removed panics 2020-04-21 23:37:00 -04:00
Folkert
f0aa598ff9 use tag id instead of name in exhaustiveness checking 2020-04-21 16:24:43 +02:00
Folkert de Vries
e00356d0c4
Merge branch 'trunk' into refactor-specializations 2020-04-18 23:35:21 +02:00
Richard Feldman
53ecf6df3e Drop some unnecessary parens 2020-04-18 15:32:17 -04:00
Richard Feldman
f0d76825d2 Extract specializations from PartialProc 2020-04-18 11:24:25 -04:00
Richard Feldman
ea713023e8 Add explicit OptLevel to add_passes 2020-04-16 20:26:08 -04:00
Richard Feldman
2a03a74135 Use the equivalent of -O3 in Inkwell 2020-04-16 19:26:25 -04:00
Richard Feldman
1c1fee7e31 Trim trailing space off pretty_assertions dep 2020-04-16 19:24:24 -04:00
Folkert
aea48f703a working parser error 2020-04-16 01:30:28 +02:00
Folkert
719ef5b70e parse error infrastructure 2020-04-15 21:10:42 +02:00
Folkert
e21cdfc689 bring parse errors into the reporting tests 2020-04-15 19:49:05 +02:00
Richard Feldman
1517581ced Load main in the CLI and use it for gen 2020-04-15 07:06:11 -04:00
Richard Feldman
9ca754b8fd First pass at loading modules from cli 2020-04-15 07:06:11 -04:00
Richard Feldman
62186fdda4 Add load tests for apps 2020-04-15 07:06:11 -04:00
Richard Feldman
6c6e1d9ee3 Update some interface tests 2020-04-15 07:06:11 -04:00
Richard Feldman
d994d11760 Parse app module headers. 2020-04-15 07:06:11 -04:00
Richard Feldman
5980bc38da Merge remote-tracking branch 'origin/trunk' into order-of-ops 2020-04-15 05:03:42 -04:00
Folkert
c42b5a1e5b improved phantom type message 2020-04-14 21:27:29 +02:00