ConstantValue initialization
This commit is contained in:
parent
4ee673d5ff
commit
25d3509ccf
4 changed files with 167 additions and 69 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::classfile::{ JavaClassFile, AttributeData, AbstractTypeDescription };
|
||||
use crate::classfile::{ JavaClassFile, AttributeData };
|
||||
use crate::heap_area::ObjectReference;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
@ -18,23 +18,6 @@ pub enum StackValue {
|
|||
Empty(),
|
||||
}
|
||||
|
||||
impl StackValue {
|
||||
fn default_for(t: AbstractTypeDescription) -> Self {
|
||||
match t {
|
||||
AbstractTypeDescription::Void() => unreachable!(),
|
||||
AbstractTypeDescription::Byte() => StackValue::Byte(0),
|
||||
AbstractTypeDescription::Char() => StackValue::Char(0),
|
||||
AbstractTypeDescription::Double() => StackValue::Double(0),
|
||||
AbstractTypeDescription::Float() => ,
|
||||
AbstractTypeDescription::Int() => ,
|
||||
AbstractTypeDescription::Long() => ,
|
||||
AbstractTypeDescription::Classname(String) => ,
|
||||
AbstractTypeDescription::Short() => ,
|
||||
AbstractTypeDescription::Boolean() => ,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct OperandStack {
|
||||
stack: Box<[StackValue]>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue