Update IR interpreter

This commit is contained in:
Chunmyong Park
2020-06-14 12:59:12 +00:00
parent 833f26b013
commit b79a713b5c

View File

@@ -611,8 +611,8 @@ mod calculator {
rhs: Value,
) -> Result<Value, ()> {
match (lhs, rhs) {
(Value::Undef { .. }, _) => Err(()),
(_, Value::Undef { .. }) => Err(()),
(Value::Undef { dtype }, _) => Ok(Value::undef(dtype)),
(_, Value::Undef { dtype }) => Ok(Value::undef(dtype)),
(
Value::Int {
value: lhs,
@@ -688,7 +688,7 @@ mod calculator {
operand: Value,
) -> Result<Value, ()> {
match operand {
Value::Undef { .. } => Err(()),
Value::Undef { dtype } => Ok(Value::undef(dtype)),
Value::Int {
value,
width,
@@ -741,7 +741,7 @@ mod calculator {
}
match (value, dtype) {
(Value::Undef { .. }, _) => Err(()),
(Value::Undef { .. }, dtype) => Ok(Value::undef(dtype)),
(
Value::Int { value, width, .. },
Dtype::Int {