pr2.3
This commit is contained in:
@@ -23,7 +23,7 @@ pub enum Value {
|
||||
/// Bounded 16-bit-ish integer.
|
||||
Bounded(u32),
|
||||
/// A pointer to an object on the heap.
|
||||
Gate(usize),
|
||||
Handle(usize),
|
||||
/// Represents the absence of a value (equivalent to `null` or `undefined`).
|
||||
Null,
|
||||
}
|
||||
@@ -43,7 +43,7 @@ impl PartialEq for Value {
|
||||
(Value::Boolean(a), Value::Boolean(b)) => a == b,
|
||||
(Value::String(a), Value::String(b)) => a == b,
|
||||
(Value::Bounded(a), Value::Bounded(b)) => a == b,
|
||||
(Value::Gate(a), Value::Gate(b)) => a == b,
|
||||
(Value::Handle(a), Value::Handle(b)) => a == b,
|
||||
(Value::Null, Value::Null) => true,
|
||||
_ => false,
|
||||
}
|
||||
@@ -99,7 +99,7 @@ impl Value {
|
||||
Value::Bounded(b) => format!("{}b", b),
|
||||
Value::Boolean(b) => b.to_string(),
|
||||
Value::String(s) => s.clone(),
|
||||
Value::Gate(r) => format!("[Gate {}]", r),
|
||||
Value::Handle(r) => format!("[Handle {}]", r),
|
||||
Value::Null => "null".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user