mike dupont
sig
f289002
raw
history blame contribute delete
18.6 kB
[
{
"psig_desc": [
"Psig_attribute",
{
"attr_name": {
"loc2": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1160
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1173
},
"loc_ghost": false
},
"txt2": "ocaml.warning"
},
"attr_payload": [
"PStr",
[
{
"pstr_desc": [
"Pstr_eval",
{
"pexp_desc": [
"Pexp_constant",
[
"Pconst_string",
"+a-4-9-30-40-41-42",
{
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1175
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1193
},
"loc_ghost": false
},
null
]
],
"pexp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1174
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1194
},
"loc_ghost": false
},
"pexp_loc_stack": [],
"pexp_attributes": []
},
[]
],
"pstr_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1174
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1194
},
"loc_ghost": false
}
}
]
],
"attr_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1156
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1195
},
"loc_ghost": false
}
}
],
"psig_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1156
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 17,
"pos_bol": 1156,
"pos_cnum": 1195
},
"loc_ghost": false
}
},
{
"psig_desc": [
"Psig_value",
{
"pval_name": {
"loc2": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 47,
"pos_bol": 2654,
"pos_cnum": 2658
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 47,
"pos_bol": 2654,
"pos_cnum": 2675
},
"loc_ghost": false
},
"txt2": "lambda_to_flambda"
},
"pval_type": {
"ptyp_desc": [
"Ptyp_arrow",
[ "Labelled", "backend" ],
{
"ptyp_desc": [ "Ptyp_package", [ "Backend_intfS", [] ] ],
"ptyp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 48,
"pos_bol": 2676,
"pos_cnum": 2689
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 48,
"pos_bol": 2676,
"pos_cnum": 2712
},
"loc_ghost": false
},
"ptyp_loc_stack": [
{
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 48,
"pos_bol": 2676,
"pos_cnum": 2697
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 48,
"pos_bol": 2676,
"pos_cnum": 2711
},
"loc_ghost": false
}
],
"ptyp_attributes": []
},
{
"ptyp_desc": [
"Ptyp_arrow",
[ "Labelled", "module_ident" ],
{
"ptyp_desc": [ "Ptyp_constr", "Identt", [] ],
"ptyp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 49,
"pos_bol": 2713,
"pos_cnum": 2731
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 49,
"pos_bol": 2713,
"pos_cnum": 2738
},
"loc_ghost": false
},
"ptyp_loc_stack": [],
"ptyp_attributes": []
},
{
"ptyp_desc": [
"Ptyp_arrow",
[ "Labelled", "size" ],
{
"ptyp_desc": [ "Ptyp_constr", "int", [] ],
"ptyp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 50,
"pos_bol": 2739,
"pos_cnum": 2749
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 50,
"pos_bol": 2739,
"pos_cnum": 2752
},
"loc_ghost": false
},
"ptyp_loc_stack": [],
"ptyp_attributes": []
},
{
"ptyp_desc": [
"Ptyp_arrow",
[ "Nolabel" ],
{
"ptyp_desc": [ "Ptyp_constr", "Lambdalambda", [] ],
"ptyp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 51,
"pos_bol": 2753,
"pos_cnum": 2758
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 51,
"pos_bol": 2753,
"pos_cnum": 2771
},
"loc_ghost": false
},
"ptyp_loc_stack": [],
"ptyp_attributes": []
},
{
"ptyp_desc": [
"Ptyp_constr", "Flambdaprogram", []
],
"ptyp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 52,
"pos_bol": 2772,
"pos_cnum": 2777
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 52,
"pos_bol": 2772,
"pos_cnum": 2792
},
"loc_ghost": false
},
"ptyp_loc_stack": [],
"ptyp_attributes": []
}
],
"ptyp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 51,
"pos_bol": 2753,
"pos_cnum": 2758
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 52,
"pos_bol": 2772,
"pos_cnum": 2792
},
"loc_ghost": false
},
"ptyp_loc_stack": [],
"ptyp_attributes": []
}
],
"ptyp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 50,
"pos_bol": 2739,
"pos_cnum": 2744
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 52,
"pos_bol": 2772,
"pos_cnum": 2792
},
"loc_ghost": false
},
"ptyp_loc_stack": [],
"ptyp_attributes": []
}
],
"ptyp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 49,
"pos_bol": 2713,
"pos_cnum": 2718
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 52,
"pos_bol": 2772,
"pos_cnum": 2792
},
"loc_ghost": false
},
"ptyp_loc_stack": [],
"ptyp_attributes": []
}
],
"ptyp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 48,
"pos_bol": 2676,
"pos_cnum": 2681
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 52,
"pos_bol": 2772,
"pos_cnum": 2792
},
"loc_ghost": false
},
"ptyp_loc_stack": [],
"ptyp_attributes": []
},
"pval_prim": [],
"pval_attributes": [
{
"attr_name": {
"loc2": {
"loc_start": {
"pos_fname": "_none_",
"pos_lnum": 0,
"pos_bol": 0,
"pos_cnum": -1
},
"loc_end": {
"pos_fname": "_none_",
"pos_lnum": 0,
"pos_bol": 0,
"pos_cnum": -1
},
"loc_ghost": true
},
"txt2": "ocaml.doc"
},
"attr_payload": [
"PStr",
[
{
"pstr_desc": [
"Pstr_eval",
{
"pexp_desc": [
"Pexp_constant",
[
"Pconst_string",
" Generation of [Flambda] intermediate language code from [Lambda] code\n by performing a form of closure conversion.\n\n Function declarations (which may bind one or more variables identifying\n functions, possibly with mutual recursion) are transformed to\n [Set_of_closures] expressions. [Project_closure] expressions are then\n used to select a closure for a particular function from a [Set_of_closures]\n expression. The [Set_of_closures] expressions say nothing about the\n actual runtime layout of the closures; this is handled when [Flambda] code\n is translated to [Clambda] code.\n\n The following transformations are also performed during closure\n conversion:\n - Constant blocks (by which is meant things wrapped in [Lambda.Const_block])\n are converted to applications of the [Pmakeblock] primitive.\n - [Levent] debugging event nodes are removed and the information within\n them attached to function, method and [raise] calls.\n - Tuplified functions are converted to curried functions and a stub\n function emitted to call the curried version. For example:\n let rec f (x, y) = f (x + 1, y + 1)\n is transformed to:\n let rec internal_f x y = f (x + 1,y + 1)\n and f (x, y) = internal_f x y (* [f] is marked as a stub function *)\n - The [Pdirapply] and [Prevapply] application primitives are removed and\n converted to normal [Flambda] application nodes.\n\n The [lambda_to_flambda] function is not re-entrant.\n",
{
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 19,
"pos_bol": 1197,
"pos_cnum": 1197
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 46,
"pos_bol": 2651,
"pos_cnum": 2653
},
"loc_ghost": false
},
null
]
],
"pexp_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 19,
"pos_bol": 1197,
"pos_cnum": 1197
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 46,
"pos_bol": 2651,
"pos_cnum": 2653
},
"loc_ghost": false
},
"pexp_loc_stack": [],
"pexp_attributes": []
},
[]
],
"pstr_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 19,
"pos_bol": 1197,
"pos_cnum": 1197
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 46,
"pos_bol": 2651,
"pos_cnum": 2653
},
"loc_ghost": false
}
}
]
],
"attr_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 19,
"pos_bol": 1197,
"pos_cnum": 1197
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 46,
"pos_bol": 2651,
"pos_cnum": 2653
},
"loc_ghost": false
}
}
],
"pval_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 47,
"pos_bol": 2654,
"pos_cnum": 2654
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 52,
"pos_bol": 2772,
"pos_cnum": 2792
},
"loc_ghost": false
}
}
],
"psig_loc": {
"loc_start": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 47,
"pos_bol": 2654,
"pos_cnum": 2654
},
"loc_end": {
"pos_fname": "./middle_end/flambda/closure_conversion.mli",
"pos_lnum": 52,
"pos_bol": 2772,
"pos_cnum": 2792
},
"loc_ghost": false
}
}
]