@@ -110,7 +110,10 @@ class java_bytecode_convert_methodt:public messaget
110
110
size_t length;
111
111
bool is_parameter;
112
112
std::vector<holet> holes;
113
- variablet () : symbol_expr(), start_pc(0 ), length(0 ), is_parameter(false ) {}
113
+
114
+ variablet () : symbol_expr(), start_pc(0 ), length(0 ), is_parameter(false )
115
+ {
116
+ }
114
117
};
115
118
116
119
protected:
@@ -124,8 +127,8 @@ class java_bytecode_convert_methodt:public messaget
124
127
125
128
enum instruction_sizet
126
129
{
127
- INST_INDEX= 2 ,
128
- INST_INDEX_CONST= 3
130
+ INST_INDEX = 2 ,
131
+ INST_INDEX_CONST = 3
129
132
};
130
133
131
134
// return corresponding reference of variable
@@ -161,22 +164,25 @@ class java_bytecode_convert_methodt:public messaget
161
164
exprt::operandst pop (std::size_t n);
162
165
163
166
void pop_residue (std::size_t n);
167
+
164
168
void push (const exprt::operandst &o);
165
169
166
170
// / Returns true iff the slot index of the local variable of a method (coming
167
171
// / from the LVT) is a parameter of that method. Assumes that
168
172
// / `slots_for_parameters` is initialized upon call.
169
173
bool is_parameter (const local_variablet &v)
170
174
{
171
- return v.index < slots_for_parameters;
175
+ return v.index < slots_for_parameters;
172
176
}
173
177
174
178
struct converted_instructiont
175
179
{
176
180
converted_instructiont (
177
181
const instructionst::const_iterator &it,
178
- const codet &_code):source(it), code(_code), done(false )
179
- {}
182
+ const codet &_code)
183
+ : source(it), code(_code), done(false )
184
+ {
185
+ }
180
186
181
187
instructionst::const_iterator source;
182
188
std::list<unsigned > successors;
@@ -211,9 +217,19 @@ class java_bytecode_convert_methodt:public messaget
211
217
bool leaf;
212
218
std::vector<unsigned > branch_addresses;
213
219
std::vector<block_tree_nodet> branch;
214
- block_tree_nodet ():leaf(false ) {}
215
- explicit block_tree_nodet (bool l):leaf(l) {}
216
- static block_tree_nodet get_leaf () { return block_tree_nodet (true ); }
220
+
221
+ block_tree_nodet () : leaf(false )
222
+ {
223
+ }
224
+
225
+ explicit block_tree_nodet (bool l) : leaf(l)
226
+ {
227
+ }
228
+
229
+ static block_tree_nodet get_leaf ()
230
+ {
231
+ return block_tree_nodet (true );
232
+ }
217
233
};
218
234
219
235
static void replace_goto_target (
@@ -235,7 +251,7 @@ class java_bytecode_convert_methodt:public messaget
235
251
unsigned address_limit,
236
252
unsigned next_block_start_address,
237
253
const address_mapt &amap,
238
- bool allow_merge= true );
254
+ bool allow_merge = true );
239
255
240
256
optionalt<symbolt> get_lambda_method_symbol (
241
257
const java_class_typet::java_lambda_method_handlest &lambda_method_handles,
@@ -261,13 +277,21 @@ class java_bytecode_convert_methodt:public messaget
261
277
irep_idt get_static_field (
262
278
const irep_idt &class_identifier, const irep_idt &component_name) const ;
263
279
264
- enum class bytecode_write_typet { VARIABLE, ARRAY_REF, STATIC_FIELD, FIELD};
280
+ enum class bytecode_write_typet
281
+ {
282
+ VARIABLE,
283
+ ARRAY_REF,
284
+ STATIC_FIELD,
285
+ FIELD
286
+ };
287
+
265
288
void save_stack_entries (
266
289
const std::string &,
267
290
const typet &,
268
291
code_blockt &,
269
292
const bytecode_write_typet,
270
293
const irep_idt &);
294
+
271
295
void create_stack_tmp_var (
272
296
const std::string &,
273
297
const typet &,
@@ -311,6 +335,12 @@ class java_bytecode_convert_methodt:public messaget
311
335
const exprt &arg0,
312
336
const source_locationt &location,
313
337
unsigned address);
314
- };
338
+
339
+ codet convert_if_cmp (
340
+ const java_bytecode_convert_methodt::address_mapt &address_map,
341
+ const irep_idt &statement,
342
+ const exprt::operandst &op,
343
+ const mp_integer &number,
344
+ const source_locationt &location) const ;
315
345
316
346
#endif
0 commit comments