mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
add special symbol for removed specializations
This commit is contained in:
parent
f9c81bffe0
commit
f99542f066
2 changed files with 5 additions and 4 deletions
|
@ -877,6 +877,9 @@ define_builtins! {
|
||||||
|
|
||||||
// used in wasm dev backend to mark temporary values in the VM stack
|
// used in wasm dev backend to mark temporary values in the VM stack
|
||||||
24 WASM_TMP: "#wasm_tmp"
|
24 WASM_TMP: "#wasm_tmp"
|
||||||
|
|
||||||
|
// the _ used in mono when a specialized symbol is deleted
|
||||||
|
25 DELETED_SPECIALIZATION: "#deleted_specialization"
|
||||||
}
|
}
|
||||||
1 NUM: "Num" => {
|
1 NUM: "Num" => {
|
||||||
0 NUM_NUM: "Num" imported // the Num.Num type alias
|
0 NUM_NUM: "Num" imported // the Num.Num type alias
|
||||||
|
|
|
@ -544,8 +544,7 @@ impl<'a> Specialized<'a> {
|
||||||
.zip(self.proc_layouts.into_iter())
|
.zip(self.proc_layouts.into_iter())
|
||||||
.zip(self.procedures.into_iter())
|
.zip(self.procedures.into_iter())
|
||||||
.filter_map(|((s, l), in_progress)| {
|
.filter_map(|((s, l), in_progress)| {
|
||||||
// we use UNDERSCORE for removed symbols
|
if let Symbol::REMOVED_SPECIALIZATION = s {
|
||||||
if let Symbol::UNDERSCORE = s {
|
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
match in_progress {
|
match in_progress {
|
||||||
|
@ -596,8 +595,7 @@ impl<'a> Specialized<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(index) = index {
|
if let Some(index) = index {
|
||||||
// we use UNDERSCORE for removed symbols
|
self.symbols[index] = Symbol::REMOVED_SPECIALIZATION;
|
||||||
self.symbols[index] = Symbol::UNDERSCORE;
|
|
||||||
|
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue