Stop calling Value::new_direct.

We only ever create table values now.

Simplify legalizer::legalize_inst_results. Instead of calling
detach_secondary_results, just detach all the results and don't treat
the first result specially.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-12 11:02:59 -07:00
parent d133606fe7
commit 8a2398be08
5 changed files with 59 additions and 63 deletions

View File

@@ -1750,12 +1750,12 @@ mod tests {
.unwrap();
assert_eq!(func.name.to_string(), "qux");
let v4 = details.map.lookup_str("v4").unwrap();
assert_eq!(v4.to_string(), "v0");
assert_eq!(v4.to_string(), "vx0");
let vx3 = details.map.lookup_str("vx3").unwrap();
assert_eq!(vx3.to_string(), "vx0");
assert_eq!(vx3.to_string(), "vx2");
let aliased_to = func.dfg
.resolve_aliases(Value::table_with_number(0).unwrap());
assert_eq!(aliased_to.to_string(), "v0");
assert_eq!(aliased_to.to_string(), "vx0");
}
#[test]