Project

General

Profile

Revision fa090c4e src/corelang.ml

View differences:

src/corelang.ml
336 336
   tag_false, Tydec_bool
337 337
  ]
338 338

  
339
(* To guarantee uniqueness of fields in struct types *)
340
let field_table =
341
  Utils.create_hashtable 20 [
342
  ]
343

  
339 344
let get_enum_type_tags cty =
340 345
 match cty with
341 346
 | Tydec_bool    -> [tag_true; tag_false]
......
343 348
                     | Tydec_enum tl -> tl
344 349
                     | _             -> assert false)
345 350
 | _            -> assert false
346

  
351
(*
352
let get_struct_type_fields cty =
353
 match cty with
354
 | Tydec_const _ -> (match Hashtbl.find type_table cty with
355
                     | Tydec_struct fl -> fl
356
                     | _               -> assert false)
357
 | _            -> assert false
358
 *)
347 359
let const_of_bool b =
348 360
 Const_tag (if b then tag_true else tag_false)
349 361

  

Also available in: Unified diff