Skip to content

Commit

Permalink
Merge pull request #492 from mgudemann/java_parse_abstract_class_attr…
Browse files Browse the repository at this point in the history
…ibute

read ACC_ABSTRACT attribute in Java class files
  • Loading branch information
Daniel Kroening authored Feb 3, 2017
2 parents 53d89b1 + 009ec58 commit ea3a21f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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

0 comments on commit ea3a21f

Please sign in to comment.