Commit Graph

1626 Commits

Author SHA1 Message Date
Folkert
2da2c25d32 research bug with linked list and uniqueness 2020-10-14 00:49:14 +02:00
Folkert
f6106166f1 fix bug with nested lets 2020-10-14 00:32:58 +02:00
Folkert
89a1146c19 run gen tests as modules 2020-10-13 21:45:41 +02:00
Folkert
2bceaf0503 implement LayoutCache on top of ena 2020-10-13 16:10:38 +02:00
Folkert de Vries
d9827ae467
Merge branch 'trunk' into improve-dependency-solving 2020-10-13 00:55:19 +02:00
Richard Feldman
a7da54516a Cast i64 to f64 instead of using builtin bitcode 2020-10-12 17:59:20 -04:00
Folkert
edc0717a7d specialize rigids 2020-10-12 23:58:39 +02:00
Folkert
973a632c25 add helper that instantiates rigids to flex vars 2020-10-12 23:52:41 +02:00
Folkert
30ff471a1b appease clippy 2020-10-12 22:19:13 +02:00
Folkert
2df86b6438 fix uniqueness bug
builtin defs were included twice, which threw off uniqueness inference
2020-10-12 22:16:10 +02:00
Folkert
78d1a01742 hopefully fix race condition bug 2020-10-12 20:26:11 +02:00
Richard Feldman
a3d81108c3
Merge branch 'trunk' into improve-dependency-solving 2020-10-12 10:23:53 -04:00
Folkert
9ad72d4979 fix unreported clippy warnings 2020-10-12 16:22:19 +02:00
Folkert
2e8499f92c fix unused import bug 2020-10-12 16:12:27 +02:00
Folkert
27cdcffec0 Merge remote-tracking branch 'origin/trunk' into improve-dependency-solving 2020-10-12 16:10:25 +02:00
Richard Feldman
2758c7f04c Always use a minimum of 1 worker 2020-10-12 09:33:11 -04:00
Folkert
06bc187f8b all tests passing + clippy satisfied 2020-10-12 01:42:03 +02:00
Brendan Hansknecht
b88f3674bb Add dynamic path for libgcc 2020-10-11 16:09:40 -07:00
Brendan Hansknecht
6e130d51bc Make link paths generic and add libgcc_s 2020-10-11 14:31:42 -07:00
Folkert
40f0588696 back to a working state 2020-10-11 21:55:26 +02:00
Folkert
5b14dc73f6 allow multiple external specializations per symbol 2020-10-11 15:25:15 +02:00
Folkert
1cd8b21670 ugh clippy 2020-10-10 20:30:33 -04:00
Folkert
fb82897e3d fix new clippy warnings 2020-10-10 20:30:33 -04:00
Richard Feldman
1c49a95e64 parse_and_constrain doesn't need to own module_ids 2020-10-10 20:30:33 -04:00
Richard Feldman
b8eff12767 Use parking_lot::Mutex 2020-10-10 20:30:33 -04:00
Folkert
4f9b27b694 sketch of a proof of concept 2020-10-11 01:54:50 +02:00
Folkert
79d3b0ac01 cross module specialization WIP 2020-10-11 01:23:52 +02:00
Folkert
5c558a9a87 get it up and running 2020-10-10 22:35:38 +02:00
Folkert
d8a0760726 hook up finding specializations 2020-10-10 21:02:31 +02:00
Folkert
8eec622d23 move over code that tries to do the full specialization process in parallel 2020-10-10 20:40:55 +02:00
Folkert
37e0523557 preparations for specializing 2020-10-10 20:28:46 +02:00
Folkert
03d9a8821b ugh clippy 2020-10-10 20:11:26 +02:00
Folkert
d346482b76 fix new clippy warnings 2020-10-10 19:59:58 +02:00
Folkert
7963843b9c cleanup 2020-10-10 19:39:33 +02:00
Folkert
085c5f54de use a Dependencies struct to track what the dependencies between modules are and when they are met 2020-10-10 19:29:10 +02:00
Richard Feldman
aab8e41d7c Clean up some dead comments 2020-10-07 22:21:36 -04:00
Folkert
3f4ec2068e weird clippy quirk 2020-10-08 01:53:02 +02:00
Folkert
518f45222a all things clippy 2020-10-08 01:32:47 +02:00
Folkert
c7b251d6b4 Merge remote-tracking branch 'origin/trunk' into gen-modules 2020-10-08 01:29:32 +02:00
Folkert
768dbbc553 all tests passing 2020-10-08 00:53:06 +02:00
Folkert
f16e17823e fix load tests 2020-10-07 23:25:47 +02:00
Folkert
6976682783 solving some compile errors 2020-10-07 21:28:42 +02:00
Richard Feldman
58e190c466 Support compiling cargo hosts 2020-10-05 22:51:08 -04:00
Richard Feldman
7e1166b3a2 Rebuild hosts automatically (for now) 2020-10-04 16:35:32 -04:00
Richard Feldman
ad16aa61e9 Change linking back 2020-10-04 16:35:21 -04:00
Richard Feldman
d776798e32 Attempt to statically link hosts 2020-10-04 16:35:17 -04:00
Richard Feldman
9405eeeb06 Fix linux linking issues 2020-10-04 16:35:04 -04:00
Richard Feldman
841373edb2 Fix linker argument order 2020-10-04 16:35:04 -04:00
Richard Feldman
48570bceef Update link.rs 2020-10-04 16:34:48 -04:00
Richard Feldman
34251f84db Link macOS hosts 2020-10-04 16:34:32 -04:00
Richard Feldman
26dfa01205 Extract target triple and linking logic 2020-10-04 16:34:11 -04:00
Richard Feldman
1c06f3fee1 Don't special-case vendors in target strings 2020-10-04 16:34:01 -04:00
Richard Feldman
4ec16749a0 Use _ over # when exporting linkable symbols 2020-10-04 15:58:13 -04:00
Folkert
faa5b2c830 fix clippy's qualms 2020-10-04 00:20:13 +02:00
Folkert
c4b4cb013e implement record update 2020-10-04 00:06:14 +02:00
Folkert
16ec417324 record update foundations 2020-10-03 21:44:25 +02:00
Folkert
c8e5acf142 code gen Accessor 2020-10-03 21:44:04 +02:00
Folkert
e9f5c1a73c actually infer the size 2020-10-02 22:33:31 +02:00
Folkert
c00cd2f415 hook everything up in the gen tests 2020-10-02 21:04:42 +02:00
Folkert
05d1f28e83 add logic to generate/solve closure size constraints 2020-10-02 20:46:47 +02:00
Folkert
a0c6952258 fix problem in uniqueness inference 2020-10-02 01:08:37 +02:00
Folkert
2e1e87ad6a add closure size variable 2020-10-02 00:53:02 +02:00
Richard Feldman
cc0fd32f27
Merge branch 'trunk' into str-refcount 2020-09-30 20:26:21 -04:00
Brendan Hansknecht
fc4f753914 Check the string is big and non-empty 2020-09-30 16:49:47 -07:00
Brendan Hansknecht
b02b25f41d Support variable ptr sizes in string refcount 2020-09-30 15:17:29 -07:00
Brendan Hansknecht
a2069a88db Merge branch 'trunk' into str-refcount 2020-09-30 15:12:17 -07:00
Folkert
a0538c815b use RocList in tests 2020-09-30 22:13:59 +02:00
Folkert
d46fb7bfb6 fix bool tests 2020-09-30 21:49:33 +02:00
Brendan Hansknecht
1082d88b2b Remove unused value from increment_refcount_ptr 2020-09-30 06:58:10 -07:00
Folkert
3d46d19585 round up malloc, but only sometimes 2020-09-30 15:57:53 +02:00
Folkert
95dffad073 WIP 2020-09-30 15:01:24 +02:00
Richard Feldman
2993d40b85 Don't support compiling to 128-bit targets 2020-09-30 08:23:44 -04:00
Brendan Hansknecht
46db0fd989 Properly size refcount based on system ptr size 2020-09-29 17:27:29 -07:00
Brendan Hansknecht
0c5beb59cb Add refcount incrementing to big strings 2020-09-29 16:14:20 -07:00
Brendan Hansknecht
5c825209eb
Merge branch 'trunk' into leak-refcount 2020-09-28 20:39:30 -07:00
Brendan Hansknecht
f532a758d9 Add refcount decrementing to big strings 2020-09-28 20:32:32 -07:00
Pablo Hirafuji
ebdeecd5d2 Run cargo fmt [2] 2020-09-27 20:59:31 -03:00
Pablo Hirafuji
0c0f70aba0 Add more docs files and check def exposition 2020-09-27 20:41:51 -03:00
Pablo Hirafuji
d68d8b4347 Merge branch 'trunk' into feature/docs-read-parse-file 2020-09-27 19:41:47 -03:00
Pablo Hirafuji
aed612a75c Load docs from files 2020-09-27 19:40:54 -03:00
Brendan Hansknecht
9e9552186e Fix list refcount dec 2020-09-27 10:18:01 -07:00
Brendan Hansknecht
51e1cd61dd Intentionally leak memory with 0 for refcount
A 0 value for refcount is the max and means leaked/read-only memory.
These values should never be incremented or decremented.
This changes also uses signed overflow when decrementing memory.
2020-09-27 09:34:51 -07:00
Brendan Hansknecht
3d6d5d1ad0 Switch refcount of 1 to be isize::MIN as usize
Also, adds helper methods for inc/dec of refcount.
2020-09-27 09:28:23 -07:00
Richard Feldman
47b1d45739 Check in builtins.bc 2020-09-26 23:59:10 -04:00
Richard Feldman
2626be4e39 Extract libm.rs into its own module 2020-09-26 23:57:40 -04:00
Richard Feldman
e55fba8aeb Extract regenerate.sh script 2020-09-26 23:52:48 -04:00
Richard Feldman
6a82fb27f8 Regenerate builtins.bc 2020-09-26 23:17:03 -04:00
Jared Ramirez
5cafbcd5ad Add Num.atan builtin 2020-09-26 19:00:51 -07:00
Folkert
f492800a28 recursive refcount on lists 2020-09-22 21:58:45 +02:00
Richard Feldman
94b1760965 Remove redundant variable 2020-09-21 21:27:39 -04:00
Richard Feldman
9381207f61 Clarify some comments 2020-09-21 21:26:56 -04:00
Folkert de Vries
2457042989
Merge branch 'trunk' into num-add-wrap-check 2020-09-21 23:58:05 +02:00
Folkert
9ac5533f80 final touchups 2020-09-21 23:57:05 +02:00
Folkert
515f717536 don't explicitly add filler bytes
leaving the memory undefined is fine
2020-09-21 23:55:05 +02:00
Folkert
b42a49035a fix some comments 2020-09-21 23:52:04 +02:00
Folkert
fb4a796e07 add different variants of addition 2020-09-21 23:38:10 +02:00
Folkert
455b73e8bd add isFinite to builtins bytecode 2020-09-21 23:31:11 +02:00
Folkert
ac8e3928e3 remove unneeded test 2020-09-21 23:30:11 +02:00
Folkert
95177eee5a integer addition operations 2020-09-20 20:21:45 +02:00
Folkert
f732eb3e83 crash upon integer overflow 2020-09-20 17:01:00 +02:00
Richard Feldman
007380a00f Merge remote-tracking branch 'origin/trunk' into exception-handling 2020-09-19 22:48:36 -04:00
Richard Feldman
b50483eedf Use rtfeldman/inkwell release2 tag 2020-09-19 22:48:29 -04:00
Guilherme Belmonte
c684dad429 Fix typos 2020-09-19 20:52:31 -03:00
Folkert
16fc5dd497 Merge remote-tracking branch 'origin/trunk' into exception-handling 2020-09-19 21:50:57 +02:00
Folkert
be6752542b update to run on our fork of inkwell again 2020-09-19 21:50:33 +02:00
Folkert
cdb768e458 add file with the roc/rust interface info 2020-09-19 01:47:10 +02:00
Folkert
9a0a13646f fix repl 2020-09-19 01:46:14 +02:00
Richard Feldman
7aada6c485
Merge pull request #529 from rtfeldman/add-attribution
Add attribution for pow_int_
2020-09-17 22:37:17 -04:00
Jared Ramirez
665c7c7f9f Add Num.floor 2020-09-17 17:44:53 -07:00
Richard Feldman
cc0f2ce700 Add attribution for pow_int_ 2020-09-17 20:27:50 -04:00
Folkert
14da3906da wip 2020-09-18 01:07:53 +02:00
Dimitar Apostolov
9276fd8c9d Add function to call bitcode 2020-09-17 14:07:25 +02:00
Dimitar Apostolov
e89af31015 Use own implementation of pow_int_ instead of llvm
Remove LLVM intrinsics code related to `Num.powInt`.
2020-09-17 14:07:18 +02:00
Dimitar Apostolov
2404882c1a Add Num.powInt implementation 2020-09-17 11:42:37 +02:00
Dimitar Apostolov
51e4b14131 Add Num.powInt types 2020-09-17 11:36:53 +02:00
Dimitar Apostolov
50223ae93c Add canonical Expr implementation for Num.powInt 2020-09-17 11:31:13 +02:00
Dimitar Apostolov
11383e97ab Add Num.powInt symbol 2020-09-17 11:23:57 +02:00
Richard Feldman
1c8383b3bb clippy things 2020-09-16 19:34:48 -04:00
Richard Feldman
5d3645350d Merge remote-tracking branch 'origin/trunk' into small-str 2020-09-16 02:23:06 -04:00
Richard Feldman
4713d41e76 Drop obsolete test 2020-09-16 02:03:34 -04:00
Richard Feldman
bec7254d92 Zero-initialize small strings using memset 2020-09-16 01:38:00 -04:00
Richard Feldman
8e630fc9fc Reproduce small string bug 2020-09-16 01:20:02 -04:00
Richard Feldman
96445262f6 Add memset intrinsic 2020-09-16 01:15:30 -04:00
Richard Feldman
bbbf5de6a5 Simplify call_intrinsic 2020-09-16 01:15:19 -04:00
Jared Ramirez
a0402bca4d Add Num.ceiling 2020-09-15 18:37:45 -07:00
Richard Feldman
099d9e35f6
Merge pull request #518 from rtfeldman/c-abi-progress
C abi progress
2020-09-14 18:28:20 -04:00
Folkert
f794874c68 Merge remote-tracking branch 'origin/trunk' into c-abi-progress 2020-09-14 22:01:12 +02:00
Dimitar Apostolov
bbb05749ab Add LLVM intrinsic for Num.pow 2020-09-14 22:01:12 +02:00
Dimitar Apostolov
d0864608fd Register types for Num.pow 2020-09-14 22:01:12 +02:00
Folkert
ee017084f7 return 3-element records 2020-09-14 21:56:57 +02:00
Folkert
d093f056b7 consider strings 2020-09-14 01:55:23 +02:00
Chad Stearns
9746e9f240 Cleaned up code, made clippy happy, deleted old List.keep_if implementation 2020-09-13 17:12:01 -04:00
Chad Stearns
30b7545da0 Fixed inplace problem in list_set 2020-09-13 15:04:34 -04:00
Chad Stearns
9351746952 Store capacity in unique list 2020-09-13 14:56:01 -04:00
Chad Stearns
4e7aecc434 Complied with clippy 2020-09-13 14:55:37 -04:00
Chad Stearns
3112025b0c Passed down inplace to everything that uses allocate_list 2020-09-13 14:46:21 -04:00
Chad Stearns
0a1e297b0f Passed result layout down build expr function 2020-09-13 13:31:57 -04:00
Richard Feldman
1efc386e5a Fix Str.concat for small strings 2020-09-12 23:25:34 -04:00
Richard Feldman
318e50f98f Drop obsolete Str.concat tests 2020-09-12 23:25:34 -04:00
Richard Feldman
4ef800d4b7 Add some TODOs about memcpys 2020-09-12 23:05:25 -04:00
Richard Feldman
254b93a8ce Add env.small_str_bytes 2020-09-12 23:05:01 -04:00
Richard Feldman
8322006e36 Add tests for the small/big concat combinations 2020-09-12 22:30:04 -04:00
Richard Feldman
d778e82d65 Fix Str.isEmpty 2020-09-12 22:05:08 -04:00
Richard Feldman
d1b1fd3a6a Consistently cast string length to usize 2020-09-12 21:57:11 -04:00
Richard Feldman
e3d0145894 Add Str.isEmpty 2020-09-12 21:56:53 -04:00
Richard Feldman
8e8a41079e Separate out str_is_not_empty
Also have list_is_not_empty use ptr_int instead of i64
2020-09-12 21:48:51 -04:00
Richard Feldman
648758f752 Fix Str.concat for big strings 2020-09-12 21:22:37 -04:00
Chad Stearns
a6c3d8edef Mostly implemented big and small string work for Str.concat. Just some bugs somewhere in the llvm 2020-09-12 17:39:41 -04:00
Chad Stearns
89ca6735eb Code compiles for load_str, but does not work 2020-09-12 16:59:00 -04:00
Richard Feldman
5f5c4354da Fix unary negation with field access
Fixes #509
2020-09-12 10:25:45 -04:00