@@ -85,24 +85,22 @@ json_objectt json(const source_locationt &location)
85
85
json_objectt result;
86
86
87
87
if (!location.get_working_directory ().empty ())
88
- result[" workingDirectory" ]=
89
- json_stringt (id2string (location.get_working_directory ()));
88
+ result[" workingDirectory" ] = json_stringt (location.get_working_directory ());
90
89
91
90
if (!location.get_file ().empty ())
92
- result[" file" ]= json_stringt (id2string ( location.get_file () ));
91
+ result[" file" ] = json_stringt (location.get_file ());
93
92
94
93
if (!location.get_line ().empty ())
95
- result[" line" ]= json_stringt (id2string ( location.get_line () ));
94
+ result[" line" ] = json_stringt (location.get_line ());
96
95
97
96
if (!location.get_column ().empty ())
98
- result[" column" ]= json_stringt (id2string ( location.get_column () ));
97
+ result[" column" ] = json_stringt (location.get_column ());
99
98
100
99
if (!location.get_function ().empty ())
101
- result[" function" ]= json_stringt (id2string ( location.get_function () ));
100
+ result[" function" ] = json_stringt (location.get_function ());
102
101
103
102
if (!location.get_java_bytecode_index ().empty ())
104
- result[" bytecodeIndex" ]=
105
- json_stringt (id2string (location.get_java_bytecode_index ()));
103
+ result[" bytecodeIndex" ] = json_stringt (location.get_java_bytecode_index ());
106
104
107
105
return result;
108
106
}
@@ -193,7 +191,7 @@ json_objectt json(
193
191
for (const auto &component : components)
194
192
{
195
193
json_objectt &e=members.push_back ().make_object ();
196
- e[" name" ]= json_stringt (id2string ( component.get_name () ));
194
+ e[" name" ] = json_stringt (component.get_name ());
197
195
e[" type" ]=json (component.type (), ns, mode);
198
196
}
199
197
}
@@ -206,7 +204,7 @@ json_objectt json(
206
204
for (const auto &component : components)
207
205
{
208
206
json_objectt &e=members.push_back ().make_object ();
209
- e[" name" ]= json_stringt (id2string ( component.get_name () ));
207
+ e[" name" ] = json_stringt (component.get_name ());
210
208
e[" type" ]=json (component.type (), ns, mode);
211
209
}
212
210
}
@@ -263,15 +261,15 @@ json_objectt json(
263
261
std::size_t width=to_bitvector_type (type).get_width ();
264
262
265
263
result[" name" ]=json_stringt (" integer" );
266
- result[" binary" ]= json_stringt (id2string ( constant_expr.get_value () ));
264
+ result[" binary" ] = json_stringt (constant_expr.get_value ());
267
265
result[" width" ]=json_numbert (std::to_string (width));
268
266
result[" type" ]=json_stringt (type_string);
269
267
result[" data" ]=json_stringt (value_string);
270
268
}
271
269
else if (type.id ()==ID_c_enum)
272
270
{
273
271
result[" name" ]=json_stringt (" integer" );
274
- result[" binary" ]= json_stringt (id2string ( constant_expr.get_value () ));
272
+ result[" binary" ] = json_stringt (constant_expr.get_value ());
275
273
result[" width" ]=json_numbert (type.subtype ().get_string (ID_width));
276
274
result[" type" ]=json_stringt (" enum" );
277
275
result[" data" ]=json_stringt (value_string);
@@ -286,21 +284,21 @@ json_objectt json(
286
284
else if (type.id ()==ID_bv)
287
285
{
288
286
result[" name" ]=json_stringt (" bitvector" );
289
- result[" binary" ]= json_stringt (id2string ( constant_expr.get_value () ));
287
+ result[" binary" ] = json_stringt (constant_expr.get_value ());
290
288
}
291
289
else if (type.id ()==ID_fixedbv)
292
290
{
293
291
result[" name" ]=json_stringt (" fixed" );
294
292
result[" width" ]=json_numbert (type.get_string (ID_width));
295
- result[" binary" ]= json_stringt (id2string ( constant_expr.get_value () ));
293
+ result[" binary" ] = json_stringt (constant_expr.get_value ());
296
294
result[" data" ]=
297
295
json_stringt (fixedbvt (to_constant_expr (expr)).to_ansi_c_string ());
298
296
}
299
297
else if (type.id ()==ID_floatbv)
300
298
{
301
299
result[" name" ]=json_stringt (" float" );
302
300
result[" width" ]=json_numbert (type.get_string (ID_width));
303
- result[" binary" ]= json_stringt (id2string ( constant_expr.get_value () ));
301
+ result[" binary" ] = json_stringt (constant_expr.get_value ());
304
302
result[" data" ]=
305
303
json_stringt (ieee_floatt (to_constant_expr (expr)).to_ansi_c_string ());
306
304
}
@@ -341,7 +339,7 @@ json_objectt json(
341
339
else if (type.id ()==ID_string)
342
340
{
343
341
result[" name" ]=json_stringt (" string" );
344
- result[" data" ]= json_stringt (id2string ( constant_expr.get_value () ));
342
+ result[" data" ] = json_stringt (constant_expr.get_value ());
345
343
}
346
344
else
347
345
{
@@ -381,7 +379,7 @@ json_objectt json(
381
379
{
382
380
json_objectt &e=members.push_back ().make_object ();
383
381
e[" value" ]=json (expr.operands ()[m], ns, mode);
384
- e[" name" ]= json_stringt (id2string ( components[m].get_name () ));
382
+ e[" name" ] = json_stringt (components[m].get_name ());
385
383
}
386
384
}
387
385
}
@@ -392,7 +390,7 @@ json_objectt json(
392
390
const union_exprt &union_expr=to_union_expr (expr);
393
391
json_objectt &e=result[" member" ].make_object ();
394
392
e[" value" ]=json (union_expr.op (), ns, mode);
395
- e[" name" ]= json_stringt (id2string ( union_expr.get_component_name () ));
393
+ e[" name" ] = json_stringt (union_expr.get_component_name ());
396
394
}
397
395
else
398
396
result[" name" ]=json_stringt (" unknown" );
0 commit comments