File tree Expand file tree Collapse file tree 6 files changed +6
-17
lines changed Expand file tree Collapse file tree 6 files changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -320,7 +320,6 @@ type let_kind = Strict | Alias | StrictOpt | Variable
320
320
type function_attribute = {
321
321
inline : inline_attribute ;
322
322
is_a_functor : bool ;
323
- stub : bool ;
324
323
return_unit : bool ;
325
324
async : bool ;
326
325
directive : string option ;
@@ -391,16 +390,12 @@ let lambda_unit = Lconst const_unit
391
390
let default_function_attribute = {
392
391
inline = Default_inline ;
393
392
is_a_functor = false ;
394
- stub = false ;
395
393
return_unit = false ;
396
394
async = false ;
397
395
oneUnitArg = false ;
398
396
directive = None ;
399
397
}
400
398
401
- let default_stub_attribute =
402
- { default_function_attribute with stub = true }
403
-
404
399
(* Build sharing keys *)
405
400
(*
406
401
Those keys are later compared with Pervasives.compare.
Original file line number Diff line number Diff line change @@ -290,7 +290,6 @@ type let_kind = Strict | Alias | StrictOpt | Variable
290
290
type function_attribute = {
291
291
inline : inline_attribute ;
292
292
is_a_functor : bool ;
293
- stub : bool ;
294
293
return_unit : bool ;
295
294
async : bool ;
296
295
directive : string option ;
@@ -387,7 +386,6 @@ val commute_comparison : comparison -> comparison
387
386
val negate_comparison : comparison -> comparison
388
387
389
388
val default_function_attribute : function_attribute
390
- val default_stub_attribute : function_attribute
391
389
392
390
(* **********************)
393
391
(* For static failures *)
Original file line number Diff line number Diff line change @@ -345,11 +345,9 @@ let name_of_primitive = function
345
345
| Popaque -> " Popaque"
346
346
| Pcreate_extension _ -> " Pcreate_extension"
347
347
348
- let function_attribute ppf { inline; is_a_functor; stub; return_unit } =
348
+ let function_attribute ppf { inline; is_a_functor; return_unit } =
349
349
if is_a_functor then
350
350
fprintf ppf " is_a_functor@ " ;
351
- if stub then
352
- fprintf ppf " stub@ " ;
353
351
if return_unit then
354
352
fprintf ppf " void@ " ;
355
353
begin match inline with
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ let get_inline_attribute l =
65
65
let rec add_inline_attribute (expr : Lambda.lambda ) loc attributes =
66
66
match (expr, get_inline_attribute attributes) with
67
67
| expr , Default_inline -> expr
68
- | Lfunction ({ attr = { stub = false } as attr } as funct ), inline ->
68
+ | Lfunction ({ attr } as funct ), inline ->
69
69
(match attr.inline with
70
70
| Default_inline -> ()
71
71
| Always_inline | Never_inline ->
Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ let transl_primitive loc p env ty =
471
471
params = [ parm ];
472
472
body = Matching. inline_lazy_force (Lvar parm) Location. none;
473
473
loc;
474
- attr = default_stub_attribute ;
474
+ attr = default_function_attribute ;
475
475
}
476
476
| Ploc kind -> (
477
477
let lam = lam_of_loc kind loc in
@@ -483,7 +483,7 @@ let transl_primitive loc p env ty =
483
483
Lfunction
484
484
{
485
485
params = [ param ];
486
- attr = default_stub_attribute ;
486
+ attr = default_function_attribute ;
487
487
loc;
488
488
body = Lprim (Pmakeblock Blk_tuple , [ lam; Lvar param ], loc);
489
489
}
@@ -505,7 +505,7 @@ let transl_primitive loc p env ty =
505
505
Lfunction
506
506
{
507
507
params;
508
- attr = default_stub_attribute ;
508
+ attr = default_function_attribute ;
509
509
loc;
510
510
body = Lprim (prim, List. map (fun id -> Lvar id) params, loc);
511
511
}
@@ -1078,7 +1078,7 @@ and transl_apply ?(inlined = Default_inline) ?(uncurried_partial_application=Non
1078
1078
{
1079
1079
params = [ id_arg ];
1080
1080
body = lam;
1081
- attr = default_stub_attribute ;
1081
+ attr = default_function_attribute ;
1082
1082
loc;
1083
1083
}
1084
1084
in
Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ and apply_coercion_result loc strict funct params args cc_res =
98
98
{
99
99
Lambda. default_function_attribute with
100
100
is_a_functor = true ;
101
- stub = true ;
102
101
};
103
102
loc;
104
103
body =
@@ -274,7 +273,6 @@ let rec compile_functor mexp coercion root_path loc =
274
273
{
275
274
inline = inline_attribute;
276
275
is_a_functor = true ;
277
- stub = false ;
278
276
return_unit = false ;
279
277
async = false ;
280
278
oneUnitArg = false ;
You can’t perform that action at this time.
0 commit comments