thread reset-reuse through

This commit is contained in:
Folkert 2021-07-03 01:13:50 +02:00
parent 5bb3146aa8
commit ee67ee546a
5 changed files with 85 additions and 55 deletions

View file

@ -832,7 +832,14 @@ fn expr_spec(
match expr {
Literal(literal) => literal_spec(builder, block, literal),
Call(call) => call_spec(builder, env, block, layout, call),
Tag {
Reuse {
tag_layout,
tag_name: _,
tag_id,
arguments,
..
}
| Tag {
tag_layout,
tag_name: _,
tag_id,
@ -914,8 +921,12 @@ fn expr_spec(
Err(()) => unreachable!("empty array does not have a list layout"),
}
}
Reuse { .. } => todo!("currently unused"),
Reset(_) => todo!("currently unused"),
Reset(symbol) => {
let type_id = layout_spec(builder, layout)?;
let value_id = env.symbols[symbol];
builder.add_unknown_with(block, &[value_id], type_id)
}
RuntimeErrorFunction(_) => {
let type_id = layout_spec(builder, layout)?;