Skip to content

Commit b87661e

Browse files
author
Owen Jones
committed
Do not create stubs when resolving virtual methods
It is no longer necessary to do this here. Stubs are getting created earlier, before method conversion.
1 parent 0ac57ba commit b87661e

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/java_bytecode/ci_lazy_methods.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,6 @@ void ci_lazy_methodst::get_virtual_method_targets(
426426
!call_basename.empty(),
427427
"Virtual function must have a reasonable name after removing class");
428428

429-
auto old_size=callable_methods.size();
430-
431429
const irep_idt &self_method=
432430
get_virtual_method_target(
433431
instantiated_classes, call_basename, call_class, symbol_table);
@@ -449,19 +447,6 @@ void ci_lazy_methodst::get_virtual_method_targets(
449447
if(!child_method.empty())
450448
callable_methods.push_back(child_method);
451449
}
452-
453-
if(callable_methods.size()==old_size)
454-
{
455-
// Didn't find any candidate callee. Generate a stub.
456-
std::string stubname=id2string(call_class)+"."+id2string(call_basename);
457-
symbolt symbol;
458-
symbol.name=stubname;
459-
symbol.base_name=call_basename;
460-
symbol.type=c.function().type();
461-
symbol.value.make_nil();
462-
symbol.mode=ID_java;
463-
symbol_table.add(symbol);
464-
}
465450
}
466451

467452
/// See output

0 commit comments

Comments
 (0)