mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Merge remote-tracking branch 'remote/main' into builtin-task
This commit is contained in:
commit
b489c44b19
262 changed files with 11354 additions and 5821 deletions
|
@ -89,8 +89,21 @@ pub enum CalledVia {
|
|||
/// e.g. "$(first) $(last)" is transformed into Str.concat (Str.concat first " ") last.
|
||||
StringInterpolation,
|
||||
|
||||
/// This call is the result of desugaring a Record Builder field.
|
||||
/// This call is the result of desugaring an old style Record Builder field.
|
||||
/// e.g. succeed { a <- get "a" } is transformed into (get "a") (succeed \a -> { a })
|
||||
OldRecordBuilder,
|
||||
|
||||
/// This call is the result of desugaring a map2-based Record Builder field. e.g.
|
||||
/// ```roc
|
||||
/// { Task.parallel <-
|
||||
/// foo: get "a",
|
||||
/// bar: get "b",
|
||||
/// }
|
||||
/// ```
|
||||
/// is transformed into
|
||||
/// ```roc
|
||||
/// Task.parallel (get "a") (get "b") \foo, bar -> { foo, bar }
|
||||
/// ```
|
||||
RecordBuilder,
|
||||
|
||||
/// This call is the result of desugaring a Task.await from `!` syntax
|
||||
|
|
|
@ -36,10 +36,6 @@ pub enum LowLevel {
|
|||
ListReplaceUnsafe,
|
||||
ListConcat,
|
||||
ListPrepend,
|
||||
ListMap,
|
||||
ListMap2,
|
||||
ListMap3,
|
||||
ListMap4,
|
||||
ListSortWith,
|
||||
ListSublist,
|
||||
ListDropAt,
|
||||
|
@ -48,6 +44,8 @@ pub enum LowLevel {
|
|||
ListIsUnique,
|
||||
ListClone,
|
||||
ListConcatUtf8,
|
||||
ListIncref,
|
||||
ListDecref,
|
||||
NumAdd,
|
||||
NumAddWrap,
|
||||
NumAddChecked,
|
||||
|
@ -135,7 +133,7 @@ pub enum LowLevel {
|
|||
|
||||
macro_rules! higher_order {
|
||||
() => {
|
||||
ListMap | ListMap2 | ListMap3 | ListMap4 | ListSortWith
|
||||
ListSortWith
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -152,10 +150,6 @@ impl LowLevel {
|
|||
use LowLevel::*;
|
||||
|
||||
match self {
|
||||
ListMap => 1,
|
||||
ListMap2 => 2,
|
||||
ListMap3 => 3,
|
||||
ListMap4 => 4,
|
||||
ListSortWith => 1,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
@ -211,10 +205,6 @@ macro_rules! map_symbol_to_lowlevel {
|
|||
|
||||
// these are higher-order lowlevels. these need the surrounding
|
||||
// function to provide enough type information for code generation
|
||||
LowLevel::ListMap => unreachable!(),
|
||||
LowLevel::ListMap2 => unreachable!(),
|
||||
LowLevel::ListMap3 => unreachable!(),
|
||||
LowLevel::ListMap4 => unreachable!(),
|
||||
LowLevel::ListSortWith => unreachable!(),
|
||||
|
||||
// (un)boxing is handled in a custom way
|
||||
|
@ -239,6 +229,8 @@ macro_rules! map_symbol_to_lowlevel {
|
|||
LowLevel::RefCountIncDataPtr => unimplemented!(),
|
||||
LowLevel::RefCountDecDataPtr=> unimplemented!(),
|
||||
LowLevel::RefCountIsUnique => unimplemented!(),
|
||||
LowLevel::ListIncref => unimplemented!(),
|
||||
LowLevel::ListDecref => unimplemented!(),
|
||||
|
||||
LowLevel::SetJmp => unimplemented!(),
|
||||
LowLevel::LongJmp => unimplemented!(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue