Move second_result outside boxed storage.

In instruction formats that have multiple results AND boxed storage,
place the second_result field outside the boxed storage. The 16-byte
instruction format has room for opcode, type, second_result in the first
8 bytes, and the boxed pointer in the last 8 bytes.

This provides a simpler implementation of the second_result() and
second_result_mut() InstructionData methods.
This commit is contained in:
Jakob Stoklund Olesen
2016-10-12 16:01:06 -07:00
parent f78baf9c0b
commit 5a2f8cbdf8
3 changed files with 16 additions and 34 deletions

View File

@@ -1089,10 +1089,8 @@ impl<'a> Parser<'a> {
InstructionData::TernaryOverflow {
opcode: opcode,
ty: VOID,
data: Box::new(TernaryOverflowData {
second_result: NO_VALUE,
args: [lhs, rhs, cin],
}),
second_result: NO_VALUE,
data: Box::new(TernaryOverflowData { args: [lhs, rhs, cin] }),
}
}
InstructionFormat::Jump => {