Skip to content

Remove deprecated side_effect_expr*t constructors #5554

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
8 changes: 4 additions & 4 deletions jbmc/src/java_bytecode/code_with_references.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ codet allocate_array(
const exprt &array_length_expr,
const source_locationt &loc)
{
const pointer_typet &pointer_type = to_pointer_type(expr.type());
pointer_typet pointer_type = to_pointer_type(expr.type());
const auto &element_type =
java_array_element_type(to_struct_tag_type(pointer_type.subtype()));
side_effect_exprt java_new_array{ID_java_new_array, pointer_type};
java_new_array.copy_to_operands(array_length_expr);
java_new_array.type().subtype().set(ID_element_type, element_type);
pointer_type.subtype().set(ID_element_type, element_type);
side_effect_exprt java_new_array{
ID_java_new_array, {array_length_expr}, pointer_type, loc};
return code_assignt{expr, java_new_array, loc};
}

Expand Down
5 changes: 3 additions & 2 deletions jbmc/src/java_bytecode/java_entry_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,9 @@ std::pair<code_blockt, std::vector<exprt>> java_build_arguments(
.symbol_expr();
main_arguments[param_number] = result;
init_code.add(code_declt{result});
init_code.add(
code_assignt{result, side_effect_exprt(ID_java_new, p.type())});
init_code.add(code_assignt{
result,
side_effect_exprt{ID_java_new, {}, p.type(), function.location}});
continue;
}

Expand Down
27 changes: 0 additions & 27 deletions src/util/std_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -1865,15 +1865,6 @@ inline const code_expressiont &to_code_expression(const codet &code)
class side_effect_exprt : public exprt
{
public:
DEPRECATED(
SINCE(2018, 8, 9, "use side_effect_exprt(statement, type, loc) instead"))
side_effect_exprt(const irep_idt &statement, const typet &_type)
: exprt(ID_side_effect, _type)
{
set_statement(statement);
}

/// constructor with operands
side_effect_exprt(
const irep_idt &statement,
operandst _operands,
Expand Down Expand Up @@ -2116,24 +2107,6 @@ to_side_effect_expr_statement_expression(const exprt &expr)
class side_effect_expr_function_callt:public side_effect_exprt
{
public:
DEPRECATED(SINCE(
2018,
8,
9,
"use side_effect_expr_function_callt("
"function, arguments, type, loc) instead"))
side_effect_expr_function_callt(
const exprt &_function,
const exprt::operandst &_arguments,
const typet &_type)
: side_effect_exprt(ID_function_call, _type)
{
operands().resize(2);
op1().id(ID_arguments);
function() = _function;
arguments() = _arguments;
}

side_effect_expr_function_callt(
exprt _function,
exprt::operandst _arguments,
Expand Down