aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/nativecode.mli
blob: 9e35dbd1b9b0f71fe87a25e61f165a000501b0d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2013     *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)
open Term
open Names
open Declarations
open Pre_env
open Nativelambda

(** This file defines the mllambda code generation phase of the native
compiler. mllambda represents a fragment of ML, and can easily be printed
to OCaml code. *)

type mllambda
type global

val pp_global : Format.formatter -> global -> unit

val mk_open : string -> global

type symbol

val clear_symb_tbl : unit -> unit

val get_value : symbol array -> int -> Nativevalues.t

val get_sort : symbol array -> int -> sorts

val get_name : symbol array -> int -> name

val get_const : symbol array -> int -> constant

val get_match : symbol array -> int -> Nativevalues.annot_sw

val get_ind : symbol array -> int -> inductive

val get_symbols_tbl : unit -> symbol array

type code_location_update
type code_location_updates
type linkable_code = global list * code_location_updates

val empty_updates : code_location_updates

val register_native_file : string -> unit

val compile_constant_field : env -> string -> constant ->
  global list * code_location_updates ->
  constant_body ->
    global list * code_location_updates

val compile_mind_field : string -> module_path -> label ->
  global list * code_location_updates ->
  mutual_inductive_body ->
    global list * code_location_updates

val mk_conv_code : env -> string -> constr -> constr -> linkable_code
val mk_norm_code : env -> string -> constr -> linkable_code

val mk_library_header : dir_path -> global list

val mod_uid_of_dirpath : dir_path -> string

val update_locations : code_location_updates -> unit

val add_header_comment : global list -> string -> global list