-
Notifications
You must be signed in to change notification settings - Fork 273
sort bytecode_info table by bytecode #4670
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -316,8 +316,9 @@ static void infer_opaque_type_fields( | |
for(const java_bytecode_parse_treet::instructiont &instruction : | ||
method.instructions) | ||
{ | ||
if(instruction.statement == "getfield" || | ||
instruction.statement == "putfield") | ||
const std::string statement = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const ref? |
||
bytecode_info[instruction.bytecode].mnemonic; | ||
if(statement == "getfield" || statement == "putfield") | ||
{ | ||
const fieldref_exprt &fieldref = | ||
expr_dynamic_cast<fieldref_exprt>(instruction.args[0]); | ||
|
@@ -461,11 +462,15 @@ static void generate_constant_global_variables( | |
{ | ||
// ldc* instructions are Java bytecode "load constant" ops, which can | ||
// retrieve a numeric constant, String literal, or Class literal. | ||
if(instruction.statement == "ldc" || | ||
instruction.statement == "ldc2" || | ||
instruction.statement == "ldc_w" || | ||
instruction.statement == "ldc2_w") | ||
const std::string statement = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const ref? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. |
||
bytecode_info[instruction.bytecode].mnemonic; | ||
// clang-format off | ||
if(statement == "ldc" || | ||
statement == "ldc2" || | ||
statement == "ldc_w" || | ||
statement == "ldc2_w") | ||
{ | ||
// clang-format on | ||
INVARIANT( | ||
instruction.args.size() != 0, | ||
"ldc instructions should have an argument"); | ||
|
@@ -589,8 +594,9 @@ static void create_stub_global_symbols( | |
for(const java_bytecode_parse_treet::instructiont &instruction : | ||
method.instructions) | ||
{ | ||
if(instruction.statement == "getstatic" || | ||
instruction.statement == "putstatic") | ||
const std::string statement = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const ref? |
||
bytecode_info[instruction.bytecode].mnemonic; | ||
if(statement == "getstatic" || statement == "putstatic") | ||
{ | ||
INVARIANT( | ||
instruction.args.size() > 0, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Const ref?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is turning a
const char *
into a string, for comparison.Won't fix now, since this will be replaced by bytecode comparisons.