Skip to content

read ACC_ABSTRACT attribute in Java class files #492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/java_bytecode/java_bytecode_parse_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ void java_bytecode_parse_treet::classt::swap(
{
other.name.swap(name);
other.extends.swap(extends);
other.is_enum=is_enum;
other.enum_elements=enum_elements;
std::swap(other.is_enum, is_enum);
std::swap(other.enum_elements, enum_elements);
std::swap(other.is_abstract, is_abstract);
other.implements.swap(implements);
other.fields.swap(fields);
Expand Down
4 changes: 2 additions & 2 deletions src/java_bytecode/java_bytecode_parse_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ class java_bytecode_parse_treet
{
public:
irep_idt name, extends;
bool is_abstract;
bool is_enum;
bool is_abstract=false;
bool is_enum=false;
size_t enum_elements=0;

typedef std::list<irep_idt> implementst;
Expand Down
1 change: 1 addition & 0 deletions src/java_bytecode/java_bytecode_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ void java_bytecode_parsert::rClassFile()
u2 this_class=read_u2();
u2 super_class=read_u2();

parsed_class.is_abstract=(access_flags&ACC_ABSTRACT)!=0;
parsed_class.is_enum=(access_flags&ACC_ENUM)!=0;
parsed_class.name=
constant(this_class).type().get(ID_C_base_name);
Expand Down