Caml1999I031Ѡ-Flambda_utils0find_declaration@*Closure_id!t@@@O@'Flambda5function_declarations@@@P4function_declaration@@@Q@@R@@S@ $middle_end/flambda/flambda_utils.mliXTTYk@@%@@9find_declaration_variable@$!t@@@T@"5function_declarations@@@U(Variable!t@@@V@@W@@X@"]#^6s@@FA@2find_free_variable@2Var_within_closure!t@@@Y@E/set_of_closures@@@Z#!t@@@[@@\@@]@CaDb@@gB@.function_arity@\4function_declaration@@@^#intA@@@_@@`@Zf88[f8p@@~C@>variables_bound_by_the_closure@}!t@@@a@{5function_declarations@@@bZ#Set!t@@@c@@d@@e@{p ? ?|q d @@D@-can_be_merged@!t@@@f@!t@@@g$boolE@@@h@@i@@j@u  u  F@@E@M@@L@2initialize_symbols@'program@@@&Symbol!t@@@#Tag!t@@@!t@@@@@@@@@@@@@@dOOf{@@M@0imported_symbols@'program@@@0#Set!t@@@@@@hh@@(N@5needed_import_symbols@'program@@@I#Set!t@@@@@@jj@@AO@?introduce_needed_import_symbols@6'program@@@<'program@@@@@@4l5lg@@XP@+root_symbol@M'program@@@x!t@@@@@@KniiLni@@oQ@6might_raise_static_exn@d%named@@@@0Static_exception!t@@@@@@@@@@@jrkr5@@R@0make_closure_map@'program@@@#Map!t2Set_of_closures_id!t@@@@@@@@@vx@@S@4all_lifted_constants@'program@@@à!t@@@7constant_defining_value@@@@@@@@@@@|~@@T@;all_lifted_constants_as_map@'program@@@#Map!t7constant_defining_value@@@@@@@@@99n@@U@ $all_lifted_constant_sets_of_closures@'program@@@a#Set!t@@@@@@**h@@V@*Su}Ck-Stdlib__Uchar0*Ujmyc6]]W.Stdlib__String0I3UK# +Stdlib__Set0.z9FX+Stdlib__Seq05"g1<)b+Stdlib__Map0kZ,ҷ'V.Stdlib__Lexing01'jh,-k4,Stdlib__Lazy0C 4 "$p1tU-Stdlib__Int640X|Gj|}%/Stdlib__Hashtbl04$*uկdD.Stdlib__Format0{hXsHW#ȼ.Stdlib__Either0&]XF.Stdlib__Digest0aI]2t*x4%".Stdlib__Buffer0K ɦb+Z8)#KH"&Stdlib0yӶ~*0Static_exception0 ]8bVwPH%Shape0H[DTċwToe@Q6Set_of_closures_origin0M0-+s-zXĩݠ2Set_of_closures_id0!7䭔(o*Projection00 rgi.1eҠ)Primitive0յ_9|br$Path0L%SsN|#Ɣj)Parsetree0`ⰧkRE)Parameter0‘sEB $^+Outcometree0gCtrvariables_bound_by_the_closurep ? Cp ? a@б@гR!t*Closure_idq d fq d r@@ @@@ 0@OJ"@A@@б@гR5function_declarations'Flambdaq d vq d @@ @@@ @@г#Set!t(Variableq d q d @@@@@ '@@@@@ *@@@0@@ -3 @@@p ? ?@S  Variables "bound by a closure" are those variables free in the corresponding function's body that are neither: - bound as parameters of that function; nor - bound by the [let] binding that introduces the function declaration(s). In particular, if [f], [g] and [h] are being introduced by a simultaneous, possibly mutually-recursive [let] binding then none of [f], [g] or [h] are bound in any of the closures for [f], [g] and [h]. hrro < >@@@@@@@ D@@@-can_be_mergedu   u  %@б@г!t'Flambda-u  (.u  1@@ @@@ 0@\t/@A@@б@г!t'FlambdaAu  5Bu  >@@ @@@ @@г $boolNu  BOu  F@@ @@@ !@@@@@ $@@@*@@ '- @@@\u  @ g If [can_be_merged f1 f2] is [true], it is safe to merge switch branches containing [f1] and [f2]. hs  it  @@@@@@@uE@@:Db>M@@ @@@$@@@@@'@@;-@@* ` @@@_@@L@@@12initialize_symbolszdOSdOe@б@г'program'Flambda)efk*efz@@ @@@0@Mg"@A@@г$list8f{9f{@Вг&Symbol!t&SymbolJf{Kf{@@@@@w!@@г#Tag!t#Tag]f{^f{@@@@@4@@г점$listkf{lf{@г!t'Flambdaxf{yf{@@ @@@O@@@@@@T @@@:( @@Z?@@@X @@@_f{V@@@f@@ciY@@@dOO\@@M@^@@i0imported_symbolshh@б@г'program'Flambdahh@@ @@@0@"@A@@гx#Set!t&Symbolhh@@@@@@@@@@@@@h @@N@ @@5needed_import_symbolsjj@б@гR'program'Flambdajj @@ @@@0@:R"@A@@г#Set!t&Symboljj@@@@@@@@@@@@@j @@O@ @@?introduce_needed_import_symbolsl#lB@б@г'program'FlambdalE lT@@ @@@0@:R"@A@@г'program'Flambda1lX2lg@@ @@@@@@@@@@@<l @@HP@ @@+root_symbolGnimHnix@б@г'program'FlambdaUni{Vni@@ @@@0FEEFFFFF@7O"@A@@г!t&Symbolgnihni@@ @@@@@@@@@@@rnii @@~Q@ @@6might_raise_static_exn}r~r@б@г%named'Flambdar r@@ @@@0|{{|||||@7O"@A@@б@г0Static_exception!t0Static_exceptionrr-@@@@@@@гi$boolr1r5@@ @@@#@@@@@&@@@,@@)/ @@@r@ O Returns [true] iff the given term might raise the given static exception. pq@@@@@@@R@@<0make_closure_mapvv@б@гN'program'Flambdaww@@ @@@0@Xp/@A@@гu#Map!t*Closure_idxx@г2Set_of_closures_id!t2Set_of_closures_idxx@@@@@$@@@"@@@) @@@/@@,2@@@v@b w Creates a map from closure IDs to set_of_closure IDs by iterating over all sets of closures in the given program. "t77#u@@@@@@@/S@.@?4all_lifted_constants.|/|@б@г'program'Flambda<}=}@@ @@@0-,,-----@[s/@A@@г̠$listK~L~@Вг!t&Symbol[~\~@@ @@@@@г7constant_defining_value'Flambdal~m~@@ @@@0@@@@@5 @@@3@@@!:|~1@@@A@@">D4@@@|7@ΐ s The definitions of all constants that have been lifted out to [Let_symbol] or [Let_rec_symbol] constructions. z  {Y@@@@@@@T@F@Q;all_lifted_constants_as_map89=9X@б@г'program'FlambdaY^Ym@@ @@@#0@m/@A@@гs#Map!t&Symbolnn@г67constant_defining_value'Flambdansn@@ @@@"@@@ @@@' @@@-@@*0@@@99@& J Like [all_lifted_constant_symbols], but returns a map instead of a list. 8@@@@@@@U@,@= $all_lifted_constant_sets_of_closuresh*.*R@б@гl'program'Flambda SX Sg@@ @@@0@Yq/@A@@г#Set!t2Set_of_closures_id hm h@@@@@@@@@@@@@ ** @l The identifiers of all constant sets of closures that have been lifted out to [Let_symbol] or [Let_rec_symbol] constructions.  , -)@@@@@@@ 9V@@+ ?@@ @@@ @@г!t&Symbol N O@@ @@@ -@@@@@ 0@@г b#Map!t(Variable d e@г r#Set!t(Variable t u@@@@@ S@@@#@@@ X @@Q-@@ [ @@@b@@ _e!@@@ $@ Ԑ  Within a set of function declarations there is a set of function bodies, each of which may (or may not) reference one of the other functions in the same set. Initially such intra-set references are by [Var]s (known as "fun_var"s) but if the function is lifted by [Lift_constants] then the references will be translated to [Symbol]s. This means that optimization passes that need to identify whether a given "fun_var" (i.e. a key in the [funs] map in a value of type [function_declarations]) is used in one of the function bodies need to examine the [free_symbols] as well as the [free_variables] members of [function_declarations]. This function makes that process easier by computing all used "fun_var"s in the bodies of the given set of function declarations, including the cases where the references are [Symbol]s. The returned value is a map from "fun_var"s to the "fun_var"s (if any) used in the body of the function associated with that "fun_var".   ~@@@@@@@ ]@3@r closures_required_by_entry_point  @б+entry_pointг 0!t*Closure_id  @@ @@@ 0        @1@A@@б.closure_symbolб@г H!t*Closure_id  @@ @@@ @@г!t&Symbol  @@ @@@!(@@@@@!+@@б@г Y5function_declarations'Flambda  #@@ @@@!=@@г #Set!t(Variable $) $7@@@@@!P@@@@@!S@@Q-@@!V  @@k]@@!Z @@@ @ _ q Computes the set of closure_id in the set of closures that are required used (transitively) the entry_point   [@@@@@@@ ,^@"@n8all_functions_parameters +9= ,9U@б@г 5function_declarations'Flambda 99X :9u@@ @@@!0 * ) ) * * * * *@/@A@@г L#Set!t(Variable N9y O9@@@@@!@@@@@! @@@ Y99 @@ e_@ @@0all_free_symbols d e@б@г 5function_declarations'Flambda r s@@ @@@! 0 c b b c c c c c@:R"@A@@г=#Set!t&Symbol  @@@@@! @@@@@! @@@  @@ `@ @@-contains_stub  @б@г 5function_declarations'Flambda  @@ @@@! 0        @:R"@A@@г u$bool  @@ @@@!@@@@@!@@@  @@ a@ @@1clean_projections  @б/which_variablesг #Map!t(Variable  @г \.specialised_to'Flambda  @@ @@@!0        @F^4@A@@@" @@@! @@г #Map!t(Variable  #@г .specialised_to'Flambda  @@ @@@!'@@@ @@@!, @@P,@@!/ %@@@ (@@ 4b@ @@63projection_to_named 3%) 4%<@б@г*Projection!t*Projection C%? D%K@@@@@!0 4 3 3 4 4 4 4 4@T~$@A@@г %named'Flambda U%O V%\@@ @@@!@@@@@!@@@ `%% @@ lc@ @@A(6specialised_to_same_asB l^c m^y@@8@@/Not_specialised@@ v|~ w|@@ e:Specialised_and_aliased_to #Set!t@@@!@@  @@ f@@A@@@@@ ^^@@@@ d@ |@@@@ @  @@г(Variable  @@'0        @`zKA8@@@A@@@@@@@@@A"@@@@$@@A@ @@0        @@A!$@ +parameters_specialised_to_the_same_variable !6!: !6!e@б.function_declsг 15function_declarations'Flambda !f!z !f!@@ @@@!0        @$d^@A@@б0specialised_argsг #Map!t(Variable !! !!@г W.specialised_to'Flambda !! !!@@ @@@!&@@@ @@@!+ @@г #Map!t(Variable!!!"@г $list !!!!@г6specialised_to_same_as!!!!@@ @@@!R@@@@@@!W @@@,@@@!\#@@Z8@@!_*!!'@@tf@@!c.!f!k+@@@1!6!6.@ } n For each parameter in a given set of function declarations and the usual specialised-args mapping, determine which other parameters are specialised to the same variable as that parameter. The result is presented as a map from [fun_vars] to lists, corresponding componentwise to the usual [params] list in the corresponding function declaration. =>!"!5@@@@@@@Jg@=@w@  @ { 7@ # @  @  F@ 2 @  @  (@ ! @  l@ e@@M@F@@]@V)@"@@U@A@@Q@= @@t@m@@rN@@m@m@Y)@"@@`@Y*@"A@]@@0xwwxxxxx@_@A@ H************************************************************************A@@A@L@ H BMMBM@ H OCaml CC@ H DD3@ H Pierre Chambart, OCamlPro E44E4@ H Mark Shinwell and Leo White, Jane Street Europe FF@ H GG@ H Copyright 2013--2016 OCamlPro SAS HHg@ H Copyright 2014--2016 Jane Street Group LLC IhhIh@ H JJ@ H All rights reserved. This file is distributed under the terms of KKN@ H the GNU Lesser General Public License version 2.1, with the LOOLO@ H special exception on linking described in the file LICENSE. MM@ H NN5@ H************************************************************************O66O6@ ;* Utility functions for the Flambda intermediate language.  3* Access functions  H* [find_declaration f decl] raises [Not_found] if [f] is not in [decl].  0 U* [find_declaration_variable f decl] raises [Not_found] if [f] is not in [decl].  ٠ J* [find_free_variable v clos] raises [Not_found] if [c] is not in [clos].  4* Utility functions  t * Variables "bound by a closure" are those variables free in the corresponding function's body that are neither: - bound as parameters of that function; nor - bound by the [let] binding that introduces the function declaration(s). In particular, if [f], [g] and [h] are being introduced by a simultaneous, possibly mutually-recursive [let] binding then none of [f], [g] or [h] are bound in any of the closures for [f], [g] and [h].  렠 h* If [can_be_merged f1 f2] is [true], it is safe to merge switch branches containing [f1] and [f2].  C Given an expression, freshen all variables within it, and form a function whose body is the resulting expression. The variables specified by [params] will become the parameters of the function; the closure will be identified by [id]. [params] must only reference variables that are free variables of [body]. y  }  @ CR-soon mshinwell: consider improving name and names of arguments lwhite: the params restriction seems odd, perhaps give a reason in the comment.  ~   @ P e@ * [bind [var1, expr1; ...; varN, exprN] body] binds using [Immutable] [Let] expressions the given [(var, expr)] pairs around the body.  P* Returns [true] iff the given term might raise the given static exception. K x* Creates a map from closure IDs to set_of_closure IDs by iterating over all sets of closures in the given program.  t* The definitions of all constants that have been lifted out to [Let_symbol] or [Let_rec_symbol] constructions.  K* Like [all_lifted_constant_symbols], but returns a map instead of a list. 6 * The identifiers of all constant sets of closures that have been lifted out to [Let_symbol] or [Let_rec_symbol] constructions.  T* All sets of closures in the given program (whether or not bound to a symbol.) k CR-someday pchambart: A more general version of this function might take a [named] instead of a symbol and be called with [Read_symbol_field (symbol, 0)]. %&^@ ,* For the compilation of switch statements. % * Within a set of function declarations there is a set of function bodies, each of which may (or may not) reference one of the other functions in the same set. Initially such intra-set references are by [Var]s (known as "fun_var"s) but if the function is lifted by [Lift_constants] then the references will be translated to [Symbol]s. This means that optimization passes that need to identify whether a given "fun_var" (i.e. a key in the [funs] map in a value of type [function_declarations]) is used in one of the function bodies need to examine the [free_symbols] as well as the [free_variables] members of [function_declarations]. This function makes that process easier by computing all used "fun_var"s in the bodies of the given set of function declarations, including the cases where the references are [Symbol]s. The returned value is a map from "fun_var"s to the "fun_var"s (if any) used in the body of the function associated with that "fun_var".  r* Computes the set of closure_id in the set of closures that are required used (transitively) the entry_point  Ensure that projection information is suitably erased from free_vars and specialised_args if we have deleted the variable being projected from. 4  5@ o* For each parameter in a given set of function declarations and the usual specialised-args mapping, determine which other parameters are specialised to the same variable as that parameter. The result is presented as a map from [fun_vars] to lists, corresponding componentwise to the usual [params] list in the corresponding function declaration. @-./boot/ocamlc"-g)-nostdlib"-I$boot*-use-prims2runtime/primitives0-strict-sequence*-principal(-absname"-w>+a-4-9-40-41-42-44-45-48-66-70+-warn-error"+a*-bin-annot,-safe-string/-strict-formats"-I%utils"-I'parsing"-I&typing"-I(bytecomp"-I,file_formats"-I&lambda"-I*middle_end"-I2middle_end/closure"-I2middle_end/flambda"-I=middle_end/flambda/base_types"-I'asmcomp"-I&driver"-I(toplevel"-cef 3/home/barsac/ci/builds/workspace/step-by-step-build - @0M Ź 6%#Hb0feefffff@d@@/Allocated_const08UYwBkc6@.(Asttypes0'$O~75Build_path_prefix_map0xөvĠ8CamlinternalFormatBasics0cEXy*Su}Ck0Ź=Z$xr%ՠ&Symbol0SW9粩i#Tag0.ΒN1BK@:), .Type_immediacy0dV^25b)̓ԆSj%Types0lm?ƈ2Var_within_closure0GMUu_%T[(Variable0+d2 ޲ՠ(Warnings0zdͦkUe$@0<5v2$|_OӡAf 0 / : 9@  @gf@ML    @  @@@ r q  @@@:9@@@@  @İͰ'&@  @  @10@@  @\[@@@@@57@ P O@@@/._^@   + *@@P@