File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,9 @@ module C = struct
254
254
| Rvar v -> reft v
255
255
| Tuple l -> node " " (List. map type_atom l)
256
256
257
+
258
+ let tuple_make fields = node " tuple.make" (Atom (List. length fields |> string_of_int) :: fields )
259
+
257
260
let local l t = node " local" [ ! $ (Expr.Local. var_name l); type_atom t ]
258
261
259
262
let param p t = node " param" [ ! $ (Param. name p); type_atom t ]
@@ -311,12 +314,12 @@ module C = struct
311
314
nodehv " loop" [ ! $ (Block_id. name id); results result ] body
312
315
313
316
let br id args =
314
- node " br" [ ! $ (Block_id. name id); node ( Format. sprintf " tuple.make %d " ( List. length args)) args ]
317
+ node " br" [ ! $ (Block_id. name id); tuple_make args ]
315
318
316
319
let br' id = node " br" [ ! $ (Block_id. name id) ]
317
320
318
321
let return args =
319
- node " return" [ node ( Format. sprintf " tuple.make %d " ( List. length args)) args ]
322
+ node " return" [ tuple_make args ]
320
323
321
324
let br_on_cast id typ arg =
322
325
node " br_on_cast" [ ! $ (Block_id. name id); type_name typ; arg ]
@@ -347,9 +350,7 @@ module C = struct
347
350
node " sub" [ type_name name; descr ]
348
351
349
352
let opt_tuple fields =
350
- [ node (Format. sprintf " tuple.make %d" (List. length fields)) fields ]
351
-
352
- let tuple_make fields = node (Format. sprintf " tuple.make %d" (List. length fields)) fields
353
+ [ tuple_make fields ]
353
354
354
355
let tuple_extract field tuple = node " tuple.extract" [ int field; tuple ]
355
356
You can’t perform that action at this time.
0 commit comments