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
320320type function_attribute = {
321321 inline : inline_attribute ;
322322 is_a_functor : bool ;
323- stub : bool ;
324323 return_unit : bool ;
325324 async : bool ;
326325 directive : string option ;
@@ -391,16 +390,12 @@ let lambda_unit = Lconst const_unit
391390let default_function_attribute = {
392391 inline = Default_inline ;
393392 is_a_functor = false ;
394- stub = false ;
395393 return_unit = false ;
396394 async = false ;
397395 oneUnitArg = false ;
398396 directive = None ;
399397}
400398
401- let default_stub_attribute =
402- { default_function_attribute with stub = true }
403-
404399(* Build sharing keys *)
405400(*
406401 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
290290type function_attribute = {
291291 inline : inline_attribute ;
292292 is_a_functor : bool ;
293- stub : bool ;
294293 return_unit : bool ;
295294 async : bool ;
296295 directive : string option ;
@@ -387,7 +386,6 @@ val commute_comparison : comparison -> comparison
387386val negate_comparison : comparison -> comparison
388387
389388val default_function_attribute : function_attribute
390- val default_stub_attribute : function_attribute
391389
392390(* **********************)
393391(* For static failures *)
Original file line number Diff line number Diff line change @@ -345,11 +345,9 @@ let name_of_primitive = function
345345 | Popaque -> " Popaque"
346346 | Pcreate_extension _ -> " Pcreate_extension"
347347
348- let function_attribute ppf { inline; is_a_functor; stub; return_unit } =
348+ let function_attribute ppf { inline; is_a_functor; return_unit } =
349349 if is_a_functor then
350350 fprintf ppf " is_a_functor@ " ;
351- if stub then
352- fprintf ppf " stub@ " ;
353351 if return_unit then
354352 fprintf ppf " void@ " ;
355353 begin match inline with
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ let get_inline_attribute l =
6565let rec add_inline_attribute (expr : Lambda.lambda ) loc attributes =
6666 match (expr, get_inline_attribute attributes) with
6767 | expr , Default_inline -> expr
68- | Lfunction ({ attr = { stub = false } as attr } as funct ), inline ->
68+ | Lfunction ({ attr } as funct ), inline ->
6969 (match attr.inline with
7070 | Default_inline -> ()
7171 | 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 =
471471 params = [ parm ];
472472 body = Matching. inline_lazy_force (Lvar parm) Location. none;
473473 loc;
474- attr = default_stub_attribute ;
474+ attr = default_function_attribute ;
475475 }
476476 | Ploc kind -> (
477477 let lam = lam_of_loc kind loc in
@@ -483,7 +483,7 @@ let transl_primitive loc p env ty =
483483 Lfunction
484484 {
485485 params = [ param ];
486- attr = default_stub_attribute ;
486+ attr = default_function_attribute ;
487487 loc;
488488 body = Lprim (Pmakeblock Blk_tuple , [ lam; Lvar param ], loc);
489489 }
@@ -505,7 +505,7 @@ let transl_primitive loc p env ty =
505505 Lfunction
506506 {
507507 params;
508- attr = default_stub_attribute ;
508+ attr = default_function_attribute ;
509509 loc;
510510 body = Lprim (prim, List. map (fun id -> Lvar id) params, loc);
511511 }
@@ -1078,7 +1078,7 @@ and transl_apply ?(inlined = Default_inline) ?(uncurried_partial_application=Non
10781078 {
10791079 params = [ id_arg ];
10801080 body = lam;
1081- attr = default_stub_attribute ;
1081+ attr = default_function_attribute ;
10821082 loc;
10831083 }
10841084 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 =
9898 {
9999 Lambda. default_function_attribute with
100100 is_a_functor = true ;
101- stub = true ;
102101 };
103102 loc;
104103 body =
@@ -274,7 +273,6 @@ let rec compile_functor mexp coercion root_path loc =
274273 {
275274 inline = inline_attribute;
276275 is_a_functor = true ;
277- stub = false ;
278276 return_unit = false ;
279277 async = false ;
280278 oneUnitArg = false ;
You can’t perform that action at this time.
0 commit comments