Skip to content

Commit 9022d37

Browse files
committed
Remove deprecated code_*t and side_effect_expr*t constructors
1 parent 2e9cd84 commit 9022d37

File tree

2 files changed

+1
-158
lines changed

2 files changed

+1
-158
lines changed

src/jsil/parser.y

+1-2
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ instruction: TOK_LABEL TOK_IDENTIFIER
267267
rhs: expression
268268
| proc_ident_expr '(' expressions_opt ')' with_opt
269269
{
270-
side_effect_expr_function_callt f;
271-
f.function().swap(stack($1));
270+
side_effect_expr_function_callt f(stack($1), {}, typet{}, {});
272271
if(stack($3).is_not_nil())
273272
f.arguments().swap(stack($3).operands());
274273

src/util/std_code.h

-156
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ Author: Daniel Kroening, [email protected]
3434
class codet:public exprt
3535
{
3636
public:
37-
DEPRECATED("use codet(statement) instead")
38-
codet():exprt(ID_code, typet(ID_code))
39-
{
40-
}
41-
4237
/// \param statement: Specifies the type of the `codet` to be constructed,
4338
/// e.g. `ID_block` for a \ref code_blockt or `ID_assign` for a
4439
/// \ref code_assignt.
@@ -496,12 +491,6 @@ inline code_deadt &to_code_dead(codet &code)
496491
class code_assumet:public codet
497492
{
498493
public:
499-
DEPRECATED("use code_assumet(expr) instead")
500-
code_assumet():codet(ID_assume)
501-
{
502-
operands().resize(1);
503-
}
504-
505494
explicit code_assumet(const exprt &expr):codet(ID_assume)
506495
{
507496
add_to_operands(expr);
@@ -548,12 +537,6 @@ inline void validate_expr(const code_assumet &x)
548537
class code_assertt:public codet
549538
{
550539
public:
551-
DEPRECATED("use code_assertt(expr) instead")
552-
code_assertt():codet(ID_assert)
553-
{
554-
operands().resize(1);
555-
}
556-
557540
explicit code_assertt(const exprt &expr):codet(ID_assert)
558541
{
559542
add_to_operands(expr);
@@ -614,14 +597,6 @@ code_blockt create_fatal_assertion(
614597
class code_ifthenelset:public codet
615598
{
616599
public:
617-
DEPRECATED("use code_ifthenelset(condition, then_code[, else_code]) instead")
618-
code_ifthenelset():codet(ID_ifthenelse)
619-
{
620-
operands().resize(3);
621-
op1().make_nil();
622-
op2().make_nil();
623-
}
624-
625600
/// An if \p condition then \p then_code else \p else_code statement.
626601
code_ifthenelset(
627602
const exprt &condition,
@@ -705,12 +680,6 @@ inline code_ifthenelset &to_code_ifthenelse(codet &code)
705680
class code_switcht:public codet
706681
{
707682
public:
708-
DEPRECATED("use code_switcht(value, body) instead")
709-
code_switcht():codet(ID_switch)
710-
{
711-
operands().resize(2);
712-
}
713-
714683
code_switcht(const exprt &_value, const codet &_body) : codet(ID_switch)
715684
{
716685
operands().resize(2);
@@ -767,12 +736,6 @@ inline code_switcht &to_code_switch(codet &code)
767736
class code_whilet:public codet
768737
{
769738
public:
770-
DEPRECATED("use code_whilet(cond, body) instead")
771-
code_whilet():codet(ID_while)
772-
{
773-
operands().resize(2);
774-
}
775-
776739
code_whilet(const exprt &_cond, const codet &_body) : codet(ID_while)
777740
{
778741
operands().resize(2);
@@ -829,12 +792,6 @@ inline code_whilet &to_code_while(codet &code)
829792
class code_dowhilet:public codet
830793
{
831794
public:
832-
DEPRECATED("use code_dowhilet(cond, body) instead")
833-
code_dowhilet():codet(ID_dowhile)
834-
{
835-
operands().resize(2);
836-
}
837-
838795
code_dowhilet(const exprt &_cond, const codet &_body) : codet(ID_dowhile)
839796
{
840797
operands().resize(2);
@@ -893,12 +850,6 @@ inline code_dowhilet &to_code_dowhile(codet &code)
893850
class code_fort:public codet
894851
{
895852
public:
896-
DEPRECATED("use code_fort(init, cond, iter, body) instead")
897-
code_fort():codet(ID_for)
898-
{
899-
operands().resize(4);
900-
}
901-
902853
/// A statement describing a for loop with initializer \p _init, loop
903854
/// condition \p _cond, increment \p _iter, and body \p _body.
904855
code_fort(
@@ -983,11 +934,6 @@ inline code_fort &to_code_for(codet &code)
983934
class code_gotot:public codet
984935
{
985936
public:
986-
DEPRECATED("use code_gotot(label) instead")
987-
code_gotot():codet(ID_goto)
988-
{
989-
}
990-
991937
explicit code_gotot(const irep_idt &label):codet(ID_goto)
992938
{
993939
set_destination(label);
@@ -1036,14 +982,6 @@ inline code_gotot &to_code_goto(codet &code)
1036982
class code_function_callt:public codet
1037983
{
1038984
public:
1039-
DEPRECATED("Use code_function_callt(...) instead")
1040-
code_function_callt():codet(ID_function_call)
1041-
{
1042-
operands().resize(3);
1043-
lhs().make_nil();
1044-
op2().id(ID_arguments);
1045-
}
1046-
1047985
explicit code_function_callt(const exprt &_function) : codet(ID_function_call)
1048986
{
1049987
operands().resize(3);
@@ -1256,12 +1194,6 @@ inline void validate_expr(const code_returnt &x)
12561194
class code_labelt:public codet
12571195
{
12581196
public:
1259-
DEPRECATED("use code_labelt(label) instead")
1260-
code_labelt():codet(ID_label)
1261-
{
1262-
operands().resize(1);
1263-
}
1264-
12651197
explicit code_labelt(const irep_idt &_label):codet(ID_label)
12661198
{
12671199
operands().resize(1);
@@ -1326,12 +1258,6 @@ inline code_labelt &to_code_label(codet &code)
13261258
class code_switch_caset:public codet
13271259
{
13281260
public:
1329-
DEPRECATED("use code_switch_caset(case_op, code) instead")
1330-
code_switch_caset():codet(ID_switch_case)
1331-
{
1332-
operands().resize(2);
1333-
}
1334-
13351261
code_switch_caset(
13361262
const exprt &_case_op, const codet &_code):codet(ID_switch_case)
13371263
{
@@ -1504,12 +1430,6 @@ inline const code_asmt &to_code_asm(const codet &code)
15041430
class code_expressiont:public codet
15051431
{
15061432
public:
1507-
DEPRECATED("use code_expressiont(expr) instead")
1508-
code_expressiont():codet(ID_expression)
1509-
{
1510-
operands().resize(1);
1511-
}
1512-
15131433
explicit code_expressiont(const exprt &expr):codet(ID_expression)
15141434
{
15151435
add_to_operands(expr);
@@ -1560,19 +1480,6 @@ inline const code_expressiont &to_code_expression(const codet &code)
15601480
class side_effect_exprt:public exprt
15611481
{
15621482
public:
1563-
DEPRECATED("use side_effect_exprt(statement, type, loc) instead")
1564-
explicit side_effect_exprt(const irep_idt &statement) : exprt(ID_side_effect)
1565-
{
1566-
set_statement(statement);
1567-
}
1568-
1569-
DEPRECATED("use side_effect_exprt(statement, type, loc) instead")
1570-
side_effect_exprt(const irep_idt &statement, const typet &_type):
1571-
exprt(ID_side_effect, _type)
1572-
{
1573-
set_statement(statement);
1574-
}
1575-
15761483
side_effect_exprt(
15771484
const irep_idt &statement,
15781485
const typet &_type,
@@ -1633,19 +1540,6 @@ inline const side_effect_exprt &to_side_effect_expr(const exprt &expr)
16331540
class side_effect_expr_nondett:public side_effect_exprt
16341541
{
16351542
public:
1636-
DEPRECATED("use side_effect_expr_nondett(statement, type, loc) instead")
1637-
side_effect_expr_nondett():side_effect_exprt(ID_nondet)
1638-
{
1639-
set_nullable(true);
1640-
}
1641-
1642-
DEPRECATED("use side_effect_expr_nondett(statement, type, loc) instead")
1643-
explicit side_effect_expr_nondett(const typet &_type):
1644-
side_effect_exprt(ID_nondet, _type)
1645-
{
1646-
set_nullable(true);
1647-
}
1648-
16491543
side_effect_expr_nondett(const typet &_type, const source_locationt &loc)
16501544
: side_effect_exprt(ID_nondet, _type, loc)
16511545
{
@@ -1691,45 +1585,6 @@ inline const side_effect_expr_nondett &to_side_effect_expr_nondet(
16911585
class side_effect_expr_function_callt:public side_effect_exprt
16921586
{
16931587
public:
1694-
DEPRECATED(
1695-
"use side_effect_expr_function_callt("
1696-
"function, arguments, type, loc) instead")
1697-
side_effect_expr_function_callt()
1698-
: side_effect_exprt(ID_function_call, typet(), source_locationt())
1699-
{
1700-
operands().resize(2);
1701-
op1().id(ID_arguments);
1702-
}
1703-
1704-
DEPRECATED(
1705-
"use side_effect_expr_function_callt("
1706-
"function, arguments, type, loc) instead")
1707-
side_effect_expr_function_callt(
1708-
const exprt &_function,
1709-
const exprt::operandst &_arguments)
1710-
: side_effect_exprt(ID_function_call)
1711-
{
1712-
operands().resize(2);
1713-
op1().id(ID_arguments);
1714-
function() = _function;
1715-
arguments() = _arguments;
1716-
}
1717-
1718-
DEPRECATED(
1719-
"use side_effect_expr_function_callt("
1720-
"function, arguments, type, loc) instead")
1721-
side_effect_expr_function_callt(
1722-
const exprt &_function,
1723-
const exprt::operandst &_arguments,
1724-
const typet &_type)
1725-
: side_effect_exprt(ID_function_call, _type)
1726-
{
1727-
operands().resize(2);
1728-
op1().id(ID_arguments);
1729-
function() = _function;
1730-
arguments() = _arguments;
1731-
}
1732-
17331588
side_effect_expr_function_callt(
17341589
const exprt &_function,
17351590
const exprt::operandst &_arguments,
@@ -1792,11 +1647,6 @@ inline const side_effect_expr_function_callt
17921647
class side_effect_expr_throwt:public side_effect_exprt
17931648
{
17941649
public:
1795-
DEPRECATED("use side_effect_expr_throwt(exception_list) instead")
1796-
side_effect_expr_throwt():side_effect_exprt(ID_throw)
1797-
{
1798-
}
1799-
18001650
side_effect_expr_throwt(
18011651
const irept &exception_list,
18021652
const typet &type,
@@ -2007,12 +1857,6 @@ static inline const code_landingpadt &to_code_landingpad(const codet &code)
20071857
class code_try_catcht:public codet
20081858
{
20091859
public:
2010-
DEPRECATED("use code_try_catcht(try_code) instead")
2011-
code_try_catcht():codet(ID_try_catch)
2012-
{
2013-
operands().resize(1);
2014-
}
2015-
20161860
/// A statement representing try \p _try_code catch ...
20171861
explicit code_try_catcht(const codet &_try_code) : codet(ID_try_catch)
20181862
{

0 commit comments

Comments
 (0)