smaller enum size
This commit is contained in:
parent
93297e1f30
commit
f50057705d
2 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ pub enum ObjectRef{
|
||||||
BooleanArray(Vec<bool>),
|
BooleanArray(Vec<bool>),
|
||||||
CharArray(Vec<char>),
|
CharArray(Vec<char>),
|
||||||
ObjectArray(Vec<Arc<UnsafeCell<ObjectRef>>>),
|
ObjectArray(Vec<Arc<UnsafeCell<ObjectRef>>>),
|
||||||
Object(Object),
|
Object(Box<Object>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,7 @@ impl Vm {
|
||||||
{
|
{
|
||||||
println!("new {}", new_class);
|
println!("new {}", new_class);
|
||||||
let class = self.get_class(new_class)?;
|
let class = self.get_class(new_class)?;
|
||||||
let object = Arc::new(UnsafeCell::new(ObjectRef::Object(self.new_instance(class))));
|
let object = Arc::new(UnsafeCell::new(ObjectRef::Object(Box::new(self.new_instance(class)))));
|
||||||
self.local_stack().push(Value::Ref(Arc::clone(&object)));
|
self.local_stack().push(Value::Ref(Arc::clone(&object)));
|
||||||
self.heap.new_object(object);
|
self.heap.new_object(object);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue