byte_extract lowering of string constants [blocks: #2068]#4186
byte_extract lowering of string constants [blocks: #2068]#4186tautschnig merged 1 commit intodiffblue:developfrom
Conversation
smowton
left a comment
There was a problem hiding this comment.
AFAIK this is all C, not Java stuff, as particularly shown by the unit test which exhibits strings with char size = 8 (Java chars are 16-bit)
| array.copy_to_operands(op); | ||
| } | ||
| } | ||
| else if(src.id() == ID_string_constant) |
There was a problem hiding this comment.
I might be wrong, but I think these are not used by Java, so the commit message may need amending
There was a problem hiding this comment.
Amended to not have that unnecessary restriction, but I do see results of git grep string_constantt in jbmc/ as well...
There was a problem hiding this comment.
They are used for input and output steps only; the Java bytecode parser makes them to describe string literals, but those are later transformed into references to constant java.lang.String instances, so there are no free-floating constants in the same way as there are in C.
There was a problem hiding this comment.
Ah, ok! I guess it must have been some C code where I had seen them in the wild.
9430dfc to
5c9be0c
Compare
5c9be0c to
eb01d4c
Compare
4d4e564 to
d532a45
Compare
These need to be handled like arrays of characters.
d532a45 to
9a67ec4
Compare
allredj
left a comment
There was a problem hiding this comment.
✔️
Passed Diffblue compatibility checks (cbmc commit: 9a67ec4).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/101065754
These need to be handled like arrays of characters.