@@ -299,9 +299,6 @@ and binop_of_json (ctx : of_json_ctx) (js : json) : (binop, string) result =
299299 | `Assoc [ (" Rem" , _0) ] ->
300300 let * _0 = overflow_mode_of_json ctx _0 in
301301 Ok (Rem _0)
302- | `String "AddChecked" -> Ok AddChecked
303- | `String "SubChecked" -> Ok SubChecked
304- | `String "MulChecked" -> Ok MulChecked
305302 | `Assoc [ (" Shl" , _0) ] ->
306303 let * _0 = overflow_mode_of_json ctx _0 in
307304 Ok (Shl _0)
@@ -502,14 +499,11 @@ and byte_of_json (ctx : of_json_ctx) (js : json) : (byte, string) result =
502499and call_of_json (ctx : of_json_ctx ) (js : json ) : (call, string) result =
503500 combine_error_msgs js __FUNCTION__
504501 (match js with
505- | `Assoc
506- [ (" func" , func); (" args" , args); (" dest" , dest); (" safety" , safety) ]
507- ->
502+ | `Assoc [ (" func" , func); (" args" , args); (" safety" , safety) ] ->
508503 let * func = fn_operand_of_json ctx func in
509504 let * args = list_of_json operand_of_json ctx args in
510- let * dest = place_of_json ctx dest in
511505 let * safety = call_safety_of_json ctx safety in
512- Ok ({ func; args; dest; safety } : call )
506+ Ok ({ func; args; safety } : call )
513507 | _ -> Error " " )
514508
515509and call_safety_of_json (ctx : of_json_ctx ) (js : json ) :
@@ -531,7 +525,9 @@ and cast_kind_of_json (ctx : of_json_ctx) (js : json) :
531525 | `Assoc [ (" RawPtr" , _0) ] ->
532526 let * _0 = ty_of_json ctx _0 in
533527 Ok (CastRawPtr _0)
534- | `String "PtrExposeProvenance" -> Ok CastPtrExposeProvenance
528+ | `Assoc [ (" PtrExposeProvenance" , _0) ] ->
529+ let * _0 = integer_type_of_json ctx _0 in
530+ Ok (CastPtrExposeProvenance _0)
535531 | `Assoc [ (" PtrWithExposedProvenance" , _0) ] ->
536532 let * _0 = ty_of_json ctx _0 in
537533 Ok (CastPtrWithExposedProvenance _0)
@@ -705,6 +701,22 @@ and constant_expr_kind_of_json (ctx : of_json_ctx) (js : json) :
705701 let * _0 = type_decl_ref_of_json ctx _0 in
706702 let * _1 = variant_id_of_json ctx _1 in
707703 Ok (CDiscriminant (_0, _1))
704+ | `Assoc
705+ [
706+ ( " Repeat" ,
707+ `Assoc
708+ [
709+ (" value" , value);
710+ (" count" , count);
711+ (" value_is_sized" , value_is_sized);
712+ ] );
713+ ] ->
714+ let * value = constant_expr_of_json ctx value in
715+ let * count = constant_expr_of_json ctx count in
716+ let * value_is_sized =
717+ option_of_json trait_ref_of_json ctx value_is_sized
718+ in
719+ Ok (CRepeat (value, count, value_is_sized))
708720 | `Assoc [ (" SizeOf" , _0) ] ->
709721 let * _0 = ty_of_json ctx _0 in
710722 Ok (CSizeOf _0)
@@ -1444,17 +1456,24 @@ and rvalue_of_json (ctx : of_json_ctx) (js : json) : (rvalue, string) result =
14441456 let * _0 = aggregate_kind_of_json ctx _0 in
14451457 let * _1 = list_of_json operand_of_json ctx _1 in
14461458 Ok (Aggregate (_0, _1))
1447- | `Assoc [ (" Len" , `List [ _0; _1; _2 ]) ] ->
1448- let * _0 = place_of_json ctx _0 in
1449- let * _1 = ty_of_json ctx _1 in
1450- let * _2 = option_of_json constant_expr_of_json ctx _2 in
1451- Ok (Len (_0, _1, _2))
1452- | `Assoc [ (" Repeat" , `List [ _0; _1; _2; _3 ]) ] ->
1453- let * _0 = operand_of_json ctx _0 in
1454- let * _1 = ty_of_json ctx _1 in
1455- let * _2 = constant_expr_of_json ctx _2 in
1456- let * _3 = option_of_json trait_ref_of_json ctx _3 in
1457- Ok (Repeat (_0, _1, _2, _3))
1459+ | `Assoc
1460+ [
1461+ ( " Repeat" ,
1462+ `Assoc
1463+ [
1464+ (" operand" , operand);
1465+ (" count" , count);
1466+ (" elem_is_copy" , elem_is_copy);
1467+ (" elem_is_sized" , elem_is_sized);
1468+ ] );
1469+ ] ->
1470+ let * operand = operand_of_json ctx operand in
1471+ let * count = constant_expr_of_json ctx count in
1472+ let * elem_is_copy = trait_ref_of_json ctx elem_is_copy in
1473+ let * elem_is_sized =
1474+ option_of_json trait_ref_of_json ctx elem_is_sized
1475+ in
1476+ Ok (Repeat (operand, count, elem_is_copy, elem_is_sized))
14581477 | _ -> Error " " )
14591478
14601479and scalar_type_of_json (ctx : of_json_ctx ) (js : json ) :
@@ -2007,13 +2026,18 @@ module Ullbc = struct
20072026 [
20082027 ( " Call" ,
20092028 `Assoc
2010- [ (" call" , call); (" target" , target); (" on_unwind" , on_unwind) ]
2011- );
2029+ [
2030+ (" call" , call);
2031+ (" dest" , dest);
2032+ (" target" , target);
2033+ (" on_unwind" , on_unwind);
2034+ ] );
20122035 ] ->
20132036 let * call = call_of_json ctx call in
2037+ let * dest = place_of_json ctx dest in
20142038 let * target = block_id_of_json ctx target in
20152039 let * on_unwind = block_id_of_json ctx on_unwind in
2016- Ok (Call (call, target, on_unwind))
2040+ Ok (Call (call, dest, target, on_unwind))
20172041 | `Assoc
20182042 [
20192043 ( " Drop" ,
@@ -2209,11 +2233,16 @@ module Llbc = struct
22092233 in
22102234 let * on_unwind = block_of_json ctx on_unwind in
22112235 Ok (InlineAsm (asm, fallthrough, labels, on_unwind))
2212- | `Assoc [ (" Call" , `Assoc [ (" call" , call); (" on_unwind" , on_unwind) ]) ]
2213- ->
2236+ | `Assoc
2237+ [
2238+ ( " Call" ,
2239+ `Assoc
2240+ [ (" call" , call); (" dest" , dest); (" on_unwind" , on_unwind) ] );
2241+ ] ->
22142242 let * call = call_of_json ctx call in
2243+ let * dest = place_of_json ctx dest in
22152244 let * on_unwind = block_of_json ctx on_unwind in
2216- Ok (Call (call, on_unwind))
2245+ Ok (Call (call, dest, on_unwind))
22172246 | `Assoc [ (" Switch" , `Assoc [ (" data" , data); (" branches" , branches) ]) ]
22182247 ->
22192248 let * data = switch_data_of_json ctx data in
0 commit comments