Use PackedOption<Value> instead of NO_VALUE.
- Remove NO_VALUE and ExpandedValue::None. - Remove the Default implelmentation for Value. - InstructionData::second_result() returns an Option<Value>. - InstructionData::second_result() returns a reference to the packed option.
This commit is contained in:
@@ -16,6 +16,7 @@ use ir::condcodes::*;
|
||||
use ir::types;
|
||||
|
||||
use ref_slice::*;
|
||||
use packed_option::PackedOption;
|
||||
|
||||
// Include code generated by `lib/cretonne/meta/gen_instr.py`. This file contains:
|
||||
//
|
||||
@@ -126,7 +127,7 @@ pub enum InstructionData {
|
||||
UnarySplit {
|
||||
opcode: Opcode,
|
||||
ty: Type,
|
||||
second_result: Value,
|
||||
second_result: PackedOption<Value>,
|
||||
arg: Value,
|
||||
},
|
||||
Binary {
|
||||
@@ -150,7 +151,7 @@ pub enum InstructionData {
|
||||
BinaryOverflow {
|
||||
opcode: Opcode,
|
||||
ty: Type,
|
||||
second_result: Value,
|
||||
second_result: PackedOption<Value>,
|
||||
args: [Value; 2],
|
||||
},
|
||||
Ternary {
|
||||
@@ -161,7 +162,7 @@ pub enum InstructionData {
|
||||
TernaryOverflow {
|
||||
opcode: Opcode,
|
||||
ty: Type,
|
||||
second_result: Value,
|
||||
second_result: PackedOption<Value>,
|
||||
data: Box<TernaryOverflowData>,
|
||||
},
|
||||
InsertLane {
|
||||
@@ -207,13 +208,13 @@ pub enum InstructionData {
|
||||
Call {
|
||||
opcode: Opcode,
|
||||
ty: Type,
|
||||
second_result: Value,
|
||||
second_result: PackedOption<Value>,
|
||||
data: Box<CallData>,
|
||||
},
|
||||
IndirectCall {
|
||||
opcode: Opcode,
|
||||
ty: Type,
|
||||
second_result: Value,
|
||||
second_result: PackedOption<Value>,
|
||||
data: Box<IndirectCallData>,
|
||||
},
|
||||
Return {
|
||||
|
||||
Reference in New Issue
Block a user