Commit graph

339 commits

Author SHA1 Message Date
Richard Feldman
15969af53c
Use constant over string literal 2022-02-01 20:44:02 -05:00
Richard Feldman
a55ff62e6c
Merge remote-tracking branch 'origin/trunk' into expect-dont-panic 2022-01-30 20:22:26 -05:00
Chelsea Troy
4f8d0776b3 We got a test working for panicking with the appropriate number fo failures. Ultimatly we want:
+ An error maessage that says what the failures were
+ Not panicking (so these are effectively error productions)
2022-01-30 18:55:09 -06:00
Folkert
684b873453 change name back ?! 2022-01-27 23:20:35 +01:00
Folkert
ee151c8f94 fix function name 2022-01-27 22:26:44 +01:00
Folkert
e31532360b don't remove argument that is not pushed 2022-01-27 21:20:46 +01:00
Folkert
3ade77374a Merge remote-tracking branch 'origin/trunk' into add_loop_examples 2022-01-27 16:49:47 +01:00
Folkert
7e28d557ec improve how we generate the mainForHost function 2022-01-26 21:08:45 -07:00
Folkert
c663a35e16 final phase 2022-01-26 15:44:24 +01:00
Folkert
7e90812332 ptr_bytes -> target info, step 1 2022-01-26 14:28:26 +01:00
Mats Sigge
71f359fbdc Move macros from roc_reporting to new roc_error_macros module
The `internal_error!` and `user_error!´ macros can't be used everywhere
when they live in `roc_reporting` due to circular dependencies.
2022-01-23 18:40:04 +01:00
Richard Feldman
638c56442c
Delete commented-out line 2022-01-22 22:41:41 -05:00
Folkert
38b03282fd working version of joinpoints with phi nodes 2022-01-23 00:46:32 +01:00
Folkert
7baec2b201 make tag allocas at the function entry point block 2022-01-23 00:21:18 +01:00
Chelsea Troy
085c02ffee Infrastructure to test and implement the replacement of an 'expect' failure with an error production
Last command run was 'cargo test expect_fail'
2022-01-16 22:01:22 -06:00
Richard Feldman
f83f50a9a7
Merge pull request #2337 from rtfeldman/i/2331
Use unsigned LLVM intrinsic arithmetic for unsigned integers
2022-01-12 08:29:30 -05:00
Folkert
1b149d215d pass pointer to C as first argument 2022-01-11 22:08:58 +01:00
Folkert
b2e05b92d1 make fastcc wrapper return by pointer if return type is large 2022-01-11 21:03:57 +01:00
ayazhafiz
2c41c43aea Implement saturated add/subtract 2022-01-10 22:37:08 -05:00
ayazhafiz
abe42781d5 Use unsigned LLVM intrinsic arithmetic for unsigned integers
Closes #2331
2022-01-10 19:20:51 -05:00
rvcas
d2f95bde63 chore(StrToNum): layout is always a Struct, we don't need the Union case 2022-01-03 18:15:46 -05:00
Chelsea Troy
922d8e57c7 trying to see if we have access to our testing modules elsewhere 2022-01-02 22:53:48 -05:00
Brian Carroll
aec8d1bf3d Merge branch 'trunk' of github.com:rtfeldman/roc into str_to_num 2022-01-02 12:31:59 +00:00
ayazhafiz
983a9f7e17 Position correct basic block before calling error catcher
While building the main function for tests, we may need to generate
additional blocks while marshalling arugments to the error catcher into
the expected calling convention. This pushes the last block in the main
function down, so that the "entry" block may not be last BB in the
function. Instead, look up the last insertion block before generating
the catcher, and then add a call to the catcher at the end of this last
block.

Closes #2300
2021-12-30 20:55:43 -06:00
ayazhafiz
f52cca40b5 Dereference small (non recursive) tag unions before storing them elsewhere
Closes #2290
2021-12-29 17:55:21 -06:00
ayazhafiz
71bd77e3b2 Handle flat variants of recursive tag unions in repl 2021-12-29 17:55:21 -06:00
rvcas
d0c4072362 fix:(llvm): StrToNum is safer if we match on either a Union or a Struct 2021-12-29 16:26:15 -05:00
Brian Carroll
e847c924dd Lowlevels: replace RefCountGetPtr with the more general GetPtrAsInt. 2021-12-19 08:29:17 +00:00
Brian Carroll
c5d0a42c20 LLVM backend: set small string flag on empty string 2021-12-16 19:04:36 +00:00
Richard Feldman
ae755d81fa
Merge pull request #2153 from rtfeldman/llvm-build-macros
Cleanup dict/list element layout matches
2021-12-12 17:50:29 -05:00
satotake
a7fe2e3e53 Fix llvm Num.toFloat width conversion
Close #2156
2021-12-11 08:12:57 +00:00
Brian Carroll
7b6ba79eee Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-tags 2021-12-10 11:48:56 +00:00
Richard Feldman
aab601366e
Merge pull request #2152 from rtfeldman/inkwell-llvm-13
update inkwell to ease the llvm13 transition
2021-12-09 19:16:23 -05:00
Richard Feldman
1ce648ac27
Merge pull request #2116 from rtfeldman/str_to_num
Str.toNum
2021-12-09 09:48:38 -05:00
Brian Carroll
0220f7d921 Remove an assumption of 64-bit pointer alignment 2021-12-08 20:30:26 +00:00
Folkert
727f2f6e93 cleanup 2021-12-08 21:02:38 +01:00
Folkert
6c5f809678 cleanup 2021-12-08 21:00:53 +01:00
Folkert
40246607aa update inkwell to ease the llvm13 transition 2021-12-08 19:36:29 +01:00
rvcas
2fa4ecd8ea chore: clippy clippy clippy can't you see, sometimes your errors hypnotize me 2021-12-06 23:52:29 -05:00
rvcas
b7d48b2fe1 feat: add the rest of the num types for Str conversion 2021-12-06 23:24:02 -05:00
rvcas
bc5b1abcba feat(Str.toNum): support decimal 2021-12-02 15:35:34 -05:00
Folkert
d6ed2147ae basic working test case 2021-12-02 20:30:58 +01:00
rvcas
8a21b42c20 feat: check errorcode in returned record for a value greater than 0 2021-12-02 14:06:29 -05:00
rvcas
0d74daf7d9 feat: match on a Union Layout and use index access to get the num layout 2021-12-01 16:25:24 -05:00
Anton-4
e63701c5d1 trying to make Str.toNum work for Ints 2021-12-01 20:37:21 +01:00
Folkert
69fc1ad7e7 sketch of StrToNum 2021-12-01 15:33:16 +01:00
Richard Feldman
e6bec46898
Merge pull request #2109 from rtfeldman/refactor-passed-function
refactor passed (to higher order lowlevel) funcion
2021-12-01 08:17:39 -05:00
Brian Carroll
a3827d6636
Merge pull request #2071 from rtfeldman/refcount-mono-ir
Start generating refcounting code as mono IR
2021-12-01 12:59:16 +00:00
Folkert
bec74c36c5 refactor passed (to higher order lowlevel) funcion 2021-11-30 21:50:27 +01:00
rvcas
f995a07029 feat: Num.toStr
* add type for Num.toStr
  * create new lowlevel
  * delete types and Symbol for fromInt and fromFloat
  * leave LowLevel::{StrFromFloat,StrFromInt}
  * match on LowLevel::NumToStr and figure out the layout to decide
    which build function to delegate to
2021-11-30 14:52:06 -05:00