Skip to content

Commit 3ddec5e

Browse files
committed
wip
1 parent 62d2058 commit 3ddec5e

50 files changed

Lines changed: 2246 additions & 1222 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

classfile/src/attribute/resolved.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::{
22
Annotation, ElementValue, ElementValuePair, ElementValueTag, ElementValueType, EnclosingMethod,
3-
InnerClass, InnerClasses,
3+
InnerClass,
44
};
55
use crate::attribute::BootstrapMethod;
66
use crate::constant_pool::types::{self, LoadableConstantPoolValue, MethodHandleEntry};

classfile/src/constant_pool/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::{ConstantPool, ConstantPoolValueInfo};
22

33
use std::borrow::Cow;
4-
use std::fmt::{Debug, Display, Formatter};
4+
use std::fmt::{Debug, Formatter};
55

66
use common::int_types::{s4, s8, u1, u2, u4};
77

classfile/src/fieldinfo.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,18 @@ impl FieldType {
142142
matches!(self, Self::Array(_))
143143
}
144144

145+
pub fn is_array_of_class(&self, name: &[u1]) -> bool {
146+
let FieldType::Array(component) = self else {
147+
return false;
148+
};
149+
150+
let FieldType::Object(component_class_name) = &**component else {
151+
return false;
152+
};
153+
154+
name == &**component_class_name
155+
}
156+
145157
pub fn as_signature(&self) -> Cow<'static, str> {
146158
match self {
147159
Self::Byte => "B".into(),

generators/vm_symbols/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,6 @@ pub fn define_symbols(input: TokenStream) -> TokenStream {
228228
]);
229229
}
230230
}
231-
}.into()
231+
}
232+
.into()
232233
}

instructions/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ mod operand;
33
mod stack;
44

55
pub use opcode::OpCode;
6-
pub use operand::{ConstOperandType, Operand};
6+
pub use operand::Operand;
77
pub use stack::StackLike;

0 commit comments

Comments
 (0)