Revision 2863281f
Added by Pierre-Loïc Garoche almost 7 years ago
src/backends/C/c_backend.ml | ||
---|---|---|
48 | 48 |
(match !Options.main_node with |
49 | 49 |
| "" -> () (* No main node: we do not generate main *) |
50 | 50 |
| main_node -> ( |
51 |
match Machine_code.get_machine_opt main_node machines with |
|
51 |
match Machine_code_common.get_machine_opt main_node machines with
|
|
52 | 52 |
| None -> begin |
53 | 53 |
Global.main_node := main_node; |
54 | 54 |
Format.eprintf "Code generation error: %a@." Error.pp_error_msg Error.Main_not_found; |
... | ... | |
70 | 70 |
| "" -> () |
71 | 71 |
| mauve -> ( |
72 | 72 |
(* looking for the main node *) |
73 |
match Machine_code.get_machine_opt mauve machines with |
|
73 |
match Machine_code_common.get_machine_opt mauve machines with
|
|
74 | 74 |
| None -> begin |
75 | 75 |
Global.main_node := mauve; |
76 | 76 |
Format.eprintf "Code generation error: %a@." Error.pp_error_msg Error.Main_not_found; |
Also available in: Unified diff
Further restructuring:
- arrow.ml* to define basic builder for arrow (node, name, ...)
- machine_code_common similar to corelang but for machine_code (printers, some builders, ...)
- machine_code restricted to the translatation from normalized nodes to machines