Refactor AttributeInfo
This commit is contained in:
parent
5f23482b1b
commit
a18ae9c265
4 changed files with 1122 additions and 905 deletions
|
|
@ -31,11 +31,11 @@ pub const MethodFlags = enum(u16) {
|
|||
|
||||
pub const MethodAccessFlags = EnumFlags(MethodFlags);
|
||||
|
||||
pub fn parse(input: *std.Io.Reader, allocator: std.mem.Allocator) !Self {
|
||||
pub fn parse(input: *std.Io.Reader, constant_pool: []const ?ConstantPoolInfo, allocator: std.mem.Allocator) !Self {
|
||||
const access_flags: MethodAccessFlags = .{ .mask = try input.takeInt(u16, .big) };
|
||||
const name_index = try input.takeInt(u16, .big);
|
||||
const descriptor_index = try input.takeInt(u16, .big);
|
||||
const attributes = try Class.parseAttributes(input, allocator);
|
||||
const attributes = try Class.parseAttributes(input, constant_pool, allocator);
|
||||
return .{
|
||||
.access_flags = access_flags,
|
||||
.name_index = name_index,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue