Skip to content

Commit fbad2d9

Browse files
Rename variable extends to super_class
This better reflects the bytecode.
1 parent da86bdb commit fbad2d9

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_class.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,9 @@ void java_bytecode_convert_classt::convert(
303303
else
304304
class_type.set_access(ID_default);
305305

306-
if(!c.extends.empty())
306+
if(!c.super_class.empty())
307307
{
308-
const symbol_typet base("java::" + id2string(c.extends));
308+
const symbol_typet base("java::" + id2string(c.super_class));
309309

310310
// if the superclass is generic then the class has the superclass reference
311311
// including the generic info in its signature
@@ -323,7 +323,7 @@ void java_bytecode_convert_classt::convert(
323323
}
324324
catch(const unsupported_java_class_signature_exceptiont &e)
325325
{
326-
warning() << "Superclass: " << c.extends << " of class: " << c.name
326+
warning() << "Superclass: " << c.super_class << " of class: " << c.name
327327
<< "\n could not parse signature: " << superclass_ref.value()
328328
<< "\n " << e.what()
329329
<< "\n ignoring that the superclass is generic" << eom;
@@ -336,9 +336,9 @@ void java_bytecode_convert_classt::convert(
336336
}
337337
class_typet::componentt base_class_field;
338338
base_class_field.type() = class_type.bases().at(0).type();
339-
base_class_field.set_name("@"+id2string(c.extends));
340-
base_class_field.set_base_name("@"+id2string(c.extends));
341-
base_class_field.set_pretty_name("@"+id2string(c.extends));
339+
base_class_field.set_name("@" + id2string(c.super_class));
340+
base_class_field.set_base_name("@" + id2string(c.super_class));
341+
base_class_field.set_pretty_name("@" + id2string(c.super_class));
342342
class_type.components().push_back(base_class_field);
343343
}
344344

@@ -561,7 +561,7 @@ void java_bytecode_convert_classt::convert(
561561
}
562562

563563
// is this a root class?
564-
if(c.extends.empty())
564+
if(c.super_class.empty())
565565
java_root_class(*class_symbol);
566566
}
567567

jbmc/src/java_bytecode/java_bytecode_parse_tree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ void java_bytecode_parse_treet::classt::output(std::ostream &out) const
3838
}
3939

4040
out << "class " << name;
41-
if(!extends.empty())
42-
out << " extends " << extends;
41+
if(!super_class.empty())
42+
out << " extends " << super_class;
4343
out << " {" << '\n';
4444

4545
for(fieldst::const_iterator

jbmc/src/java_bytecode/java_bytecode_parse_tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ struct java_bytecode_parse_treet
197197
classt &operator=(classt &&) = default;
198198
#endif
199199

200-
irep_idt name, extends;
200+
irep_idt name, super_class;
201201
bool is_abstract=false;
202202
bool is_enum=false;
203203
bool is_public=false, is_protected=false, is_private=false;

jbmc/src/java_bytecode/java_bytecode_parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ void java_bytecode_parsert::rClassFile()
503503
constant(this_class).type().get(ID_C_base_name);
504504

505505
if(super_class!=0)
506-
parsed_class.extends=
506+
parsed_class.super_class=
507507
constant(super_class).type().get(ID_C_base_name);
508508

509509
rinterfaces(parsed_class);

0 commit comments

Comments
 (0)