|
|
@ -577,10 +577,16 @@ let rec expression context pc expr =
|
|
|
|
let field_type = (JTransType.get_class_type program tenv (JBasics.make_cn JConfig.string_cl)) in
|
|
|
|
let field_type = (JTransType.get_class_type program tenv (JBasics.make_cn JConfig.string_cl)) in
|
|
|
|
JTransStaticField.translate_instr_static_field context callee_procdesc fs field_type loc
|
|
|
|
JTransStaticField.translate_instr_static_field context callee_procdesc fs field_type loc
|
|
|
|
else
|
|
|
|
else
|
|
|
|
let sil_expr = Sil.Lfield (sil_expr, field_name, sil_type) in
|
|
|
|
if JTransType.is_autogenerated_assert_field field_name
|
|
|
|
let tmp_id = Ident.create_fresh Ident.knormal in
|
|
|
|
then
|
|
|
|
let lderef_instr = Sil.Letderef (tmp_id, sil_expr, sil_type, loc) in
|
|
|
|
(* assume that reading from C.$assertionsDisabled always yields "false". this allows *)
|
|
|
|
(idl @ [tmp_id], instrs @ [lderef_instr], Sil.Var tmp_id)
|
|
|
|
(* Infer to understand the assert keyword in the expected way *)
|
|
|
|
|
|
|
|
(idl, instrs, Sil.exp_zero)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
let sil_expr = Sil.Lfield (sil_expr, field_name, sil_type) in
|
|
|
|
|
|
|
|
let tmp_id = Ident.create_fresh Ident.knormal in
|
|
|
|
|
|
|
|
let lderef_instr = Sil.Letderef (tmp_id, sil_expr, sil_type, loc) in
|
|
|
|
|
|
|
|
(idl @ [tmp_id], instrs @ [lderef_instr], Sil.Var tmp_id)
|
|
|
|
|
|
|
|
|
|
|
|
let method_invocation context loc pc var_opt cn ms sil_obj_opt expr_list invoke_code is_static =
|
|
|
|
let method_invocation context loc pc var_opt cn ms sil_obj_opt expr_list invoke_code is_static =
|
|
|
|
let cfg = JContext.get_cfg context in
|
|
|
|
let cfg = JContext.get_cfg context in
|
|
|
|