Skip to content

Commit ecb6efb

Browse files
author
Daniel Kroening
committed
deal with mnemonic suffixes without constructing new mnemonic
Instead of construcing a new string, the few cases are checked explicitly. This prepares for using bytecodes in the case split.
1 parent 8a01f3d commit ecb6efb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,6 @@ code_blockt java_bytecode_convert_methodt::convert_instructions(
11601160
string2integer(
11611161
std::string(id2string(statement), statement.size()-1, 1)),
11621162
java_int_type());
1163-
statement=std::string(id2string(statement), 0, statement.size()-2);
11641163
}
11651164

11661165
typet catch_type;
@@ -1288,7 +1287,8 @@ code_blockt java_bytecode_convert_methodt::convert_instructions(
12881287
assert(op.size()==3 && results.empty());
12891288
c = convert_astore(statement, op, i_it->source_location);
12901289
}
1291-
else if(statement==patternt("?store"))
1290+
else if(
1291+
statement == patternt("?store") || statement == patternt("?store_?"))
12921292
{
12931293
// store value into some local variable
12941294
PRECONDITION(op.size() == 1 && results.empty());
@@ -1300,7 +1300,7 @@ code_blockt java_bytecode_convert_methodt::convert_instructions(
13001300
PRECONDITION(op.size() == 2 && results.size() == 1);
13011301
results[0] = convert_aload(statement, op);
13021302
}
1303-
else if(statement==patternt("?load"))
1303+
else if(statement == patternt("?load") || statement == patternt("?load_?"))
13041304
{
13051305
// load a value from a local variable
13061306
results[0]=
@@ -1355,7 +1355,7 @@ code_blockt java_bytecode_convert_methodt::convert_instructions(
13551355
assert(results.size()==1);
13561356
results[0]=from_integer(-1, java_int_type());
13571357
}
1358-
else if(statement==patternt("?const"))
1358+
else if(statement == patternt("?const_?"))
13591359
{
13601360
assert(results.size()==1);
13611361
results = convert_const(statement, to_constant_expr(arg0), results);

0 commit comments

Comments
 (0)