diff --git a/jscomp/core/j.ml b/jscomp/core/j.ml index d47bbd80e1..084f3e90af 100644 --- a/jscomp/core/j.ml +++ b/jscomp/core/j.ml @@ -39,38 +39,38 @@ *) +type mutable_flag = Js_op.mutable_flag -type label = string +type binop = Js_op.binop -and binop = Js_op.binop +type int_op = Js_op.int_op -and int_op = Js_op.int_op - -and kind = Js_op.kind +type kind = Js_op.kind -and property = Js_op.property +type property = Js_op.property -and number = Js_op.number +type number = Js_op.number -and mutable_flag = Js_op.mutable_flag +type ident_info = Js_op.ident_info -and ident_info = Js_op.ident_info +type exports = Js_op.exports -and exports = Js_op.exports +type tag_info = Js_op.tag_info -and tag_info = Js_op.tag_info +type property_name = Js_op.property_name + +type label = string and required_modules = module_id list - - +and ident = Ident.t (* we override `method ident` *) (** object literal, if key is ident, in this case, it might be renamed by Google Closure optimizer, currently we always use quote *) -and property_name = Js_op.property_name -and ident = Ident.t + + and module_id = { id : ident; kind : Js_op.kind } @@ -350,3 +350,4 @@ and deps_program = modules : required_modules ; side_effect : string option (* None: no, Some reason *) } + [@@deriving] \ No newline at end of file diff --git a/jscomp/core/js_analyzer.ml b/jscomp/core/js_analyzer.ml index 63240088e1..1f15e28084 100644 --- a/jscomp/core/js_analyzer.ml +++ b/jscomp/core/js_analyzer.ml @@ -44,21 +44,21 @@ let add_defined_idents (x : idents_stats) ident = Note such shaking is done in the toplevel, so that it requires us to flatten the statement first *) -let free_variables (stats : idents_stats) : Js_fold.fold = +let free_variables (stats : idents_stats) : Js_iter.iter = object (self) - inherit Js_fold.fold as super + inherit Js_iter.iter as super method! variable_declaration st = add_defined_idents stats st.ident; match st.value with | None - -> self + -> () | Some v -> self # expression v method! ident id = (if not (Set_ident.mem stats.defined_idents id )then - stats.used_idents <- Set_ident.add stats.used_idents id); - self + stats.used_idents <- Set_ident.add stats.used_idents id) + method! expression exp = match exp.expression_desc with | Fun(_, _,_, env) @@ -67,8 +67,8 @@ let free_variables (stats : idents_stats) : Js_fold.fold = *) -> stats.used_idents <- - Set_ident.union (Js_fun_env.get_unbounded env) stats.used_idents; - self + Set_ident.union (Js_fun_env.get_unbounded env) stats.used_idents + | _ -> @@ -139,32 +139,31 @@ and no_side_effect (x : J.expression) = let no_side_effect_expression (x : J.expression) = no_side_effect x -let no_side_effect clean : Js_fold.fold = +let no_side_effect clean : Js_iter.iter = object (self) - inherit Js_fold.fold as super + inherit Js_iter.iter as super method! statement s = - if not !clean then self else + if !clean then match s.statement_desc with | Throw _ | Debugger | Break | Variable _ | Continue _ -> - clean := false ; self + clean := false | Exp e -> self#expression e | Int_switch _ | String_switch _ | ForRange _ | If _ | While _ | Block _ | Return _ | Try _ -> super#statement s method! list f x = - if not !clean then self else super#list f x + if !clean then super#list f x method! expression s = - (if !clean then - clean := no_side_effect_expression s); - self - (** only expression would cause side effec *) + if !clean then + clean := no_side_effect_expression s + (** only expression would cause side effec *) end let no_side_effect_statement st = let clean = ref true in - let _ : Js_fold.fold = ((no_side_effect clean)#statement st) in + (no_side_effect clean)#statement st; !clean (* TODO: generate [fold2] diff --git a/jscomp/core/js_fold.ml b/jscomp/core/js_fold.ml index b444ff841e..a23c023d8b 100644 --- a/jscomp/core/js_fold.ml +++ b/jscomp/core/js_fold.ml @@ -1,236 +1,194 @@ open J - class virtual fold = - object ((o : 'self_type)) - method unknown : 'a. 'a -> 'self_type = fun _ -> o - method string : string -> 'self_type = fun _ -> o + let [@inline] unknown _self _ = _self + class fold = + object ((_self : 'self_type)) method option : 'a. ('self_type -> 'a -> 'self_type) -> 'a option -> 'self_type = - fun _f_a -> function | None -> o | Some _x -> let o = _f_a o _x in o + fun _f_a -> function | None -> _self | Some _x -> let _self = _f_a _self _x in _self method list : 'a. ('self_type -> 'a -> 'self_type) -> 'a list -> 'self_type = fun _f_a -> function - | [] -> o - | _x :: _x_i1 -> let o = _f_a o _x in let o = o#list _f_a _x_i1 in o - method int32 : int32 -> 'self_type = fun _ -> o - method int : int -> 'self_type = fun _ -> o - method bool : bool -> 'self_type = fun _ -> o - method label : label -> 'self_type = o#string -method binop : binop -> 'self_type = o#unknown -method int_op : int_op -> 'self_type = o#unknown -method kind : kind -> 'self_type = o#unknown -method property : property -> 'self_type = o#unknown -method number : number -> 'self_type = o#unknown -method mutable_flag : mutable_flag -> 'self_type = o#unknown -method ident_info : ident_info -> 'self_type = o#unknown -method exports : exports -> 'self_type = o#unknown -method tag_info : tag_info -> 'self_type = o#unknown -method required_modules : required_modules -> 'self_type = o#list (fun o -> o#module_id) -method property_name : property_name -> 'self_type = o#unknown -method ident : ident -> 'self_type = o#unknown -method module_id : module_id -> 'self_type = fun { id = _x0;kind = _x1} -> let o = o#ident _x0 in -let o = o#unknown _x1 in o + | [] -> _self + | _x :: _x_i1 -> let _self = _f_a _self _x in let _self = _self#list _f_a _x_i1 in _self + method label : label -> 'self_type = unknown _self +method required_modules : required_modules -> 'self_type = _self#list (fun _self -> _self#module_id) +method ident : ident -> 'self_type = unknown _self +method module_id : module_id -> 'self_type = fun { id = _x0;kind = _x1} -> let _self = _self#ident _x0 in _self method vident : vident -> 'self_type = function | Id ( _x0) -> -let o = o#ident _x0 in - o +let _self = _self#ident _x0 in + _self |Qualified ( _x0,_x1) -> -let o = o#module_id _x0 in -let o = o#option (fun o -> o#string) _x1 in - o -method exception_ident : exception_ident -> 'self_type = o#ident -method for_ident : for_ident -> 'self_type = o#ident -method for_direction : for_direction -> 'self_type = o#unknown -method property_map : property_map -> 'self_type = o#list (fun o -> fun ( _x0,_x1) -> let o = o#property_name _x0 in let o = o#expression _x1 in o) -method length_object : length_object -> 'self_type = o#unknown +let _self = _self#module_id _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in + _self +method exception_ident : exception_ident -> 'self_type = _self#ident +method for_ident : for_ident -> 'self_type = _self#ident +method for_direction : for_direction -> 'self_type = unknown _self +method property_map : property_map -> 'self_type = _self#list (fun _self -> fun ( _x0,_x1) -> let _self = _self#expression _x1 in _self) +method length_object : length_object -> 'self_type = unknown _self method expression_desc : expression_desc -> 'self_type = function | Length ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#length_object _x1 in - o +let _self = _self#expression _x0 in +let _self = _self#length_object _x1 in + _self |Char_of_int ( _x0) -> -let o = o#expression _x0 in - o +let _self = _self#expression _x0 in + _self |Char_to_int ( _x0) -> -let o = o#expression _x0 in - o +let _self = _self#expression _x0 in + _self |Is_null_or_undefined ( _x0) -> -let o = o#expression _x0 in - o +let _self = _self#expression _x0 in + _self |String_append ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o -|Bool ( _x0) -> -let o = o#bool _x0 in - o +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Bool _ -> _self |Typeof ( _x0) -> -let o = o#expression _x0 in - o +let _self = _self#expression _x0 in + _self |Js_not ( _x0) -> -let o = o#expression _x0 in - o +let _self = _self#expression _x0 in + _self |Seq ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self |Cond ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#expression _x1 in -let o = o#expression _x2 in - o +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in +let _self = _self#expression _x2 in + _self |Bin ( _x0,_x1,_x2) -> -let o = o#binop _x0 in -let o = o#expression _x1 in -let o = o#expression _x2 in - o +let _self = _self#expression _x1 in +let _self = _self#expression _x2 in + _self |FlatCall ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self |Call ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#expression) _x1 in -let o = o#unknown _x2 in - o +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#expression) _x1 in + _self |String_index ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self |Array_index ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self |Static_index ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#string _x1 in -let o = o#option (fun o -> o#int32) _x2 in - o +let _self = _self#expression _x0 in +let _self = _self#option (fun _self -> unknown _self) _x2 in + _self |New ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#option (fun o -> o#list (fun o -> o#expression)) _x1 in - o +let _self = _self#expression _x0 in +let _self = _self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 in + _self |Var ( _x0) -> -let o = o#vident _x0 in - o +let _self = _self#vident _x0 in + _self |Fun ( _x0,_x1,_x2,_x3) -> -let o = o#bool _x0 in -let o = o#list (fun o -> o#ident) _x1 in -let o = o#block _x2 in -let o = o#unknown _x3 in - o -|Str ( _x0,_x1) -> -let o = o#bool _x0 in -let o = o#string _x1 in - o -|Unicode ( _x0) -> -let o = o#string _x0 in - o -|Raw_js_code ( _x0) -> -let o = o#unknown _x0 in - o +let _self = _self#list (fun _self -> _self#ident) _x1 in +let _self = _self#block _x2 in + _self +|Str _ -> _self +|Unicode _ -> _self +|Raw_js_code _ -> _self |Array ( _x0,_x1) -> -let o = o#list (fun o -> o#expression) _x0 in -let o = o#mutable_flag _x1 in - o +let _self = _self#list (fun _self -> _self#expression) _x0 in + _self |Optional_block ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#bool _x1 in - o +let _self = _self#expression _x0 in + _self |Caml_block ( _x0,_x1,_x2,_x3) -> -let o = o#list (fun o -> o#expression) _x0 in -let o = o#mutable_flag _x1 in -let o = o#expression _x2 in -let o = o#tag_info _x3 in - o +let _self = _self#list (fun _self -> _self#expression) _x0 in +let _self = _self#expression _x2 in + _self |Caml_block_tag ( _x0) -> -let o = o#expression _x0 in - o -|Number ( _x0) -> -let o = o#number _x0 in - o +let _self = _self#expression _x0 in + _self +|Number _ -> _self |Object ( _x0) -> -let o = o#property_map _x0 in - o -|Undefined -> o -|Null -> o -method for_ident_expression : for_ident_expression -> 'self_type = o#expression -method finish_ident_expression : finish_ident_expression -> 'self_type = o#expression +let _self = _self#property_map _x0 in + _self +|Undefined -> _self +|Null -> _self +method for_ident_expression : for_ident_expression -> 'self_type = _self#expression +method finish_ident_expression : finish_ident_expression -> 'self_type = _self#expression method statement_desc : statement_desc -> 'self_type = function | Block ( _x0) -> -let o = o#block _x0 in - o +let _self = _self#block _x0 in + _self |Variable ( _x0) -> -let o = o#variable_declaration _x0 in - o +let _self = _self#variable_declaration _x0 in + _self |Exp ( _x0) -> -let o = o#expression _x0 in - o +let _self = _self#expression _x0 in + _self |If ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#block _x1 in -let o = o#block _x2 in - o +let _self = _self#expression _x0 in +let _self = _self#block _x1 in +let _self = _self#block _x2 in + _self |While ( _x0,_x1,_x2,_x3) -> -let o = o#option (fun o -> o#label) _x0 in -let o = o#expression _x1 in -let o = o#block _x2 in -let o = o#unknown _x3 in - o +let _self = _self#option (fun _self -> _self#label) _x0 in +let _self = _self#expression _x1 in +let _self = _self#block _x2 in + _self |ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> -let o = o#option (fun o -> o#for_ident_expression) _x0 in -let o = o#finish_ident_expression _x1 in -let o = o#for_ident _x2 in -let o = o#for_direction _x3 in -let o = o#block _x4 in -let o = o#unknown _x5 in - o +let _self = _self#option (fun _self -> _self#for_ident_expression) _x0 in +let _self = _self#finish_ident_expression _x1 in +let _self = _self#for_ident _x2 in +let _self = _self#for_direction _x3 in +let _self = _self#block _x4 in + _self |Continue ( _x0) -> -let o = o#label _x0 in - o -|Break -> o +let _self = _self#label _x0 in + _self +|Break -> _self |Return ( _x0) -> -let o = o#expression _x0 in - o +let _self = _self#expression _x0 in + _self |Int_switch ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#int_clause) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#int_clause) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self |String_switch ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#string_clause) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#string_clause) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self |Throw ( _x0) -> -let o = o#expression _x0 in - o +let _self = _self#expression _x0 in + _self |Try ( _x0,_x1,_x2) -> -let o = o#block _x0 in -let o = o#option (fun o -> fun ( _x0,_x1) -> let o = o#exception_ident _x0 in let o = o#block _x1 in o) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o -|Debugger -> o -method expression : expression -> 'self_type = fun { expression_desc = _x0;comment = _x1} -> let o = o#expression_desc _x0 in -let o = o#option (fun o -> o#string) _x1 in o -method statement : statement -> 'self_type = fun { statement_desc = _x0;comment = _x1} -> let o = o#statement_desc _x0 in -let o = o#option (fun o -> o#string) _x1 in o -method variable_declaration : variable_declaration -> 'self_type = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let o = o#ident _x0 in -let o = o#option (fun o -> o#expression) _x1 in -let o = o#property _x2 in -let o = o#ident_info _x3 in o -method string_clause : string_clause -> 'self_type = fun ( _x0,_x1) -> let o = o#string _x0 in let o = o#case_clause _x1 in o -method int_clause : int_clause -> 'self_type = fun ( _x0,_x1) -> let o = o#int _x0 in let o = o#case_clause _x1 in o -method case_clause : case_clause -> 'self_type = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let o = o#block _x0 in -let o = o#bool _x1 in -let o = o#option (fun o -> o#string) _x2 in o -method block : block -> 'self_type = o#list (fun o -> o#statement) -method program : program -> 'self_type = fun { block = _x0;exports = _x1;export_set = _x2} -> let o = o#block _x0 in -let o = o#exports _x1 in -let o = o#unknown _x2 in o -method deps_program : deps_program -> 'self_type = fun { program = _x0;modules = _x1;side_effect = _x2} -> let o = o#program _x0 in -let o = o#required_modules _x1 in -let o = o#option (fun o -> o#string) _x2 in o +let _self = _self#block _x0 in +let _self = _self#option (fun _self -> fun ( _x0,_x1) -> let _self = _self#exception_ident _x0 in let _self = _self#block _x1 in _self) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|Debugger -> _self +method expression : expression -> 'self_type = fun { expression_desc = _x0;comment = _x1} -> let _self = _self#expression_desc _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in _self +method statement : statement -> 'self_type = fun { statement_desc = _x0;comment = _x1} -> let _self = _self#statement_desc _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in _self +method variable_declaration : variable_declaration -> 'self_type = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _self = _self#ident _x0 in +let _self = _self#option (fun _self -> _self#expression) _x1 in _self +method string_clause : string_clause -> 'self_type = fun ( _x0,_x1) -> let _self = _self#case_clause _x1 in _self +method int_clause : int_clause -> 'self_type = fun ( _x0,_x1) -> let _self = _self#case_clause _x1 in _self +method case_clause : case_clause -> 'self_type = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _self = _self#block _x0 in +let _self = _self#option (fun _self -> unknown _self) _x2 in _self +method block : block -> 'self_type = _self#list (fun _self -> _self#statement) +method program : program -> 'self_type = fun { block = _x0;exports = _x1;export_set = _x2} -> let _self = _self#block _x0 in _self +method deps_program : deps_program -> 'self_type = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _self = _self#program _x0 in +let _self = _self#required_modules _x1 in +let _self = _self#option (fun _self -> unknown _self) _x2 in _self end \ No newline at end of file diff --git a/jscomp/core/js_fold_basic.ml b/jscomp/core/js_fold_basic.ml index 266ef8950e..c3da2e7f3c 100644 --- a/jscomp/core/js_fold_basic.ml +++ b/jscomp/core/js_fold_basic.ml @@ -28,11 +28,11 @@ let add_lam_module_ident = Lam_module_ident.Hash_set.add let create = Lam_module_ident.Hash_set.create let count_hard_dependencies hard_dependencies = - object(self : 'self_type) - inherit Js_fold.fold as super + object + inherit Js_iter.iter as super method! module_id vid = - add_lam_module_ident hard_dependencies vid; self - method! expression x : 'self_type = + add_lam_module_ident hard_dependencies vid + method! expression x = (* check {!Js_pass_scope} when making changes *) (match Js_block_runtime.check_additional_id x with | Some id -> @@ -45,7 +45,7 @@ let count_hard_dependencies hard_dependencies = let calculate_hard_dependencies block = let hard_dependencies = create 17 in - let _ : Js_fold.fold = (count_hard_dependencies hard_dependencies)#block block in + (count_hard_dependencies hard_dependencies)#block block ; hard_dependencies (* diff --git a/jscomp/core/js_iter.ml b/jscomp/core/js_iter.ml new file mode 100644 index 0000000000..5d5d4048f5 --- /dev/null +++ b/jscomp/core/js_iter.ml @@ -0,0 +1,122 @@ + + open J + let unknown _self _ = () + class iter = + object ((_self : 'self_type)) + method option : + 'a. ('self_type -> 'a -> unit) -> 'a option -> unit = + fun _f_a -> function | None -> () | Some _x -> _f_a _self _x + method list : + 'a. ('self_type -> 'a -> unit) -> 'a list -> unit = + fun _f_a -> + function + | [] -> () + | _x :: _x_i1 -> _f_a _self _x ; _self#list _f_a _x_i1 + method label : label -> unit = unknown _self +method required_modules : required_modules -> unit = _self#list (fun _self -> _self#module_id) +method ident : ident -> unit = unknown _self +method module_id : module_id -> unit = fun { id = _x0;kind = _x1} -> begin _self#ident _x0 end +method vident : vident -> unit = function +| Id ( _x0) -> + begin _self#ident _x0 end +|Qualified ( _x0,_x1) -> + begin _self#module_id _x0;_self#option (fun _self -> unknown _self) _x1 end +method exception_ident : exception_ident -> unit = _self#ident +method for_ident : for_ident -> unit = _self#ident +method for_direction : for_direction -> unit = unknown _self +method property_map : property_map -> unit = _self#list (fun _self -> fun ( _x0,_x1) -> begin _self#expression _x1 end) +method length_object : length_object -> unit = unknown _self +method expression_desc : expression_desc -> unit = function +| Length ( _x0,_x1) -> + begin _self#expression _x0;_self#length_object _x1 end +|Char_of_int ( _x0) -> + begin _self#expression _x0 end +|Char_to_int ( _x0) -> + begin _self#expression _x0 end +|Is_null_or_undefined ( _x0) -> + begin _self#expression _x0 end +|String_append ( _x0,_x1) -> + begin _self#expression _x0;_self#expression _x1 end +|Bool _ -> () +|Typeof ( _x0) -> + begin _self#expression _x0 end +|Js_not ( _x0) -> + begin _self#expression _x0 end +|Seq ( _x0,_x1) -> + begin _self#expression _x0;_self#expression _x1 end +|Cond ( _x0,_x1,_x2) -> + begin _self#expression _x0;_self#expression _x1;_self#expression _x2 end +|Bin ( _x0,_x1,_x2) -> + begin _self#expression _x1;_self#expression _x2 end +|FlatCall ( _x0,_x1) -> + begin _self#expression _x0;_self#expression _x1 end +|Call ( _x0,_x1,_x2) -> + begin _self#expression _x0;_self#list (fun _self -> _self#expression) _x1 end +|String_index ( _x0,_x1) -> + begin _self#expression _x0;_self#expression _x1 end +|Array_index ( _x0,_x1) -> + begin _self#expression _x0;_self#expression _x1 end +|Static_index ( _x0,_x1,_x2) -> + begin _self#expression _x0;_self#option (fun _self -> unknown _self) _x2 end +|New ( _x0,_x1) -> + begin _self#expression _x0;_self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 end +|Var ( _x0) -> + begin _self#vident _x0 end +|Fun ( _x0,_x1,_x2,_x3) -> + begin _self#list (fun _self -> _self#ident) _x1;_self#block _x2 end +|Str _ -> () +|Unicode _ -> () +|Raw_js_code _ -> () +|Array ( _x0,_x1) -> + begin _self#list (fun _self -> _self#expression) _x0 end +|Optional_block ( _x0,_x1) -> + begin _self#expression _x0 end +|Caml_block ( _x0,_x1,_x2,_x3) -> + begin _self#list (fun _self -> _self#expression) _x0;_self#expression _x2 end +|Caml_block_tag ( _x0) -> + begin _self#expression _x0 end +|Number _ -> () +|Object ( _x0) -> + begin _self#property_map _x0 end +|Undefined -> () +|Null -> () +method for_ident_expression : for_ident_expression -> unit = _self#expression +method finish_ident_expression : finish_ident_expression -> unit = _self#expression +method statement_desc : statement_desc -> unit = function +| Block ( _x0) -> + begin _self#block _x0 end +|Variable ( _x0) -> + begin _self#variable_declaration _x0 end +|Exp ( _x0) -> + begin _self#expression _x0 end +|If ( _x0,_x1,_x2) -> + begin _self#expression _x0;_self#block _x1;_self#block _x2 end +|While ( _x0,_x1,_x2,_x3) -> + begin _self#option (fun _self -> _self#label) _x0;_self#expression _x1;_self#block _x2 end +|ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> + begin _self#option (fun _self -> _self#for_ident_expression) _x0;_self#finish_ident_expression _x1;_self#for_ident _x2;_self#for_direction _x3;_self#block _x4 end +|Continue ( _x0) -> + begin _self#label _x0 end +|Break -> () +|Return ( _x0) -> + begin _self#expression _x0 end +|Int_switch ( _x0,_x1,_x2) -> + begin _self#expression _x0;_self#list (fun _self -> _self#int_clause) _x1;_self#option (fun _self -> _self#block) _x2 end +|String_switch ( _x0,_x1,_x2) -> + begin _self#expression _x0;_self#list (fun _self -> _self#string_clause) _x1;_self#option (fun _self -> _self#block) _x2 end +|Throw ( _x0) -> + begin _self#expression _x0 end +|Try ( _x0,_x1,_x2) -> + begin _self#block _x0;_self#option (fun _self -> fun ( _x0,_x1) -> begin _self#exception_ident _x0;_self#block _x1 end) _x1;_self#option (fun _self -> _self#block) _x2 end +|Debugger -> () +method expression : expression -> unit = fun { expression_desc = _x0;comment = _x1} -> begin _self#expression_desc _x0;_self#option (fun _self -> unknown _self) _x1 end +method statement : statement -> unit = fun { statement_desc = _x0;comment = _x1} -> begin _self#statement_desc _x0;_self#option (fun _self -> unknown _self) _x1 end +method variable_declaration : variable_declaration -> unit = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> begin _self#ident _x0;_self#option (fun _self -> _self#expression) _x1 end +method string_clause : string_clause -> unit = fun ( _x0,_x1) -> begin _self#case_clause _x1 end +method int_clause : int_clause -> unit = fun ( _x0,_x1) -> begin _self#case_clause _x1 end +method case_clause : case_clause -> unit = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> begin _self#block _x0;_self#option (fun _self -> unknown _self) _x2 end +method block : block -> unit = _self#list (fun _self -> _self#statement) +method program : program -> unit = fun { block = _x0;exports = _x1;export_set = _x2} -> begin _self#block _x0 end +method deps_program : deps_program -> unit = fun { program = _x0;modules = _x1;side_effect = _x2} -> begin _self#program _x0;_self#required_modules _x1;_self#option (fun _self -> unknown _self) _x2 end + end + \ No newline at end of file diff --git a/jscomp/core/js_map.ml b/jscomp/core/js_map.ml index 45e4478203..502c83e411 100644 --- a/jscomp/core/js_map.ml +++ b/jscomp/core/js_map.ml @@ -1,238 +1,196 @@ open J -class virtual map = object -((o : 'self_type)) -method unknown : 'a. 'a -> 'a = fun x -> x -method string : string -> string = fun x -> x +let unknown : 'a. 'a -> 'a = fun x -> x +class map = object +((_self : 'self_type)) method option : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a option -> 'a_out option = fun _f_a -> - function | None -> None | Some _x -> let _x = _f_a o _x in Some _x + function | None -> None | Some _x -> let _x = _f_a _self _x in Some _x method list : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a list -> 'a_out list = fun _f_a -> function | [] -> [] | _x :: _x_i1 -> - let _x = _f_a o _x in - let _x_i1 = o#list _f_a _x_i1 in _x :: _x_i1 -method int32 : int32 -> int32 = fun x -> x -method int : int -> int = fun x -> x -method bool : bool -> bool = fun x -> x -method label : label -> label = o#string -method binop : binop -> binop = o#unknown -method int_op : int_op -> int_op = o#unknown -method kind : kind -> kind = o#unknown -method property : property -> property = o#unknown -method number : number -> number = o#unknown -method mutable_flag : mutable_flag -> mutable_flag = o#unknown -method ident_info : ident_info -> ident_info = o#unknown -method exports : exports -> exports = o#unknown -method tag_info : tag_info -> tag_info = o#unknown -method required_modules : required_modules -> required_modules = o#list (fun o -> o#module_id) -method property_name : property_name -> property_name = o#unknown -method ident : ident -> ident = o#unknown -method module_id : module_id -> module_id = fun { id = _x0;kind = _x1} -> let _x0 = o#ident _x0 in -let _x1 = o#unknown _x1 in {id = _x0;kind = _x1} + let _x = _f_a _self _x in + let _x_i1 = _self#list _f_a _x_i1 in _x :: _x_i1 +method label : label -> label = unknown +method required_modules : required_modules -> required_modules = _self#list (fun _self -> _self#module_id) +method ident : ident -> ident = unknown +method module_id : module_id -> module_id = fun { id = _x0;kind = _x1} -> let _x0 = _self#ident _x0 in {id = _x0;kind = _x1} method vident : vident -> vident = function | Id ( _x0) -> -let _x0 = o#ident _x0 in +let _x0 = _self#ident _x0 in Id ( _x0) |Qualified ( _x0,_x1) -> -let _x0 = o#module_id _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in +let _x0 = _self#module_id _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in Qualified ( _x0,_x1) -method exception_ident : exception_ident -> exception_ident = o#ident -method for_ident : for_ident -> for_ident = o#ident -method for_direction : for_direction -> for_direction = o#unknown -method property_map : property_map -> property_map = o#list (fun o -> fun ( _x0,_x1) -> let _x0 = o#property_name _x0 in let _x1 = o#expression _x1 in _x0,_x1) -method length_object : length_object -> length_object = o#unknown +method exception_ident : exception_ident -> exception_ident = _self#ident +method for_ident : for_ident -> for_ident = _self#ident +method for_direction : for_direction -> for_direction = unknown +method property_map : property_map -> property_map = _self#list (fun _self -> fun ( _x0,_x1) -> let _x1 = _self#expression _x1 in _x0,_x1) +method length_object : length_object -> length_object = unknown method expression_desc : expression_desc -> expression_desc = function | Length ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#length_object _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#length_object _x1 in Length ( _x0,_x1) |Char_of_int ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Char_of_int ( _x0) |Char_to_int ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Char_to_int ( _x0) |Is_null_or_undefined ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Is_null_or_undefined ( _x0) |String_append ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in String_append ( _x0,_x1) -|Bool ( _x0) -> -let _x0 = o#bool _x0 in -Bool ( _x0) +|Bool _ as v -> v |Typeof ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Typeof ( _x0) |Js_not ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Js_not ( _x0) |Seq ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in Seq ( _x0,_x1) |Cond ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#expression _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in +let _x2 = _self#expression _x2 in Cond ( _x0,_x1,_x2) |Bin ( _x0,_x1,_x2) -> -let _x0 = o#binop _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#expression _x2 in +let _x1 = _self#expression _x1 in +let _x2 = _self#expression _x2 in Bin ( _x0,_x1,_x2) |FlatCall ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in FlatCall ( _x0,_x1) |Call ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#expression) _x1 in -let _x2 = o#unknown _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#expression) _x1 in Call ( _x0,_x1,_x2) |String_index ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in String_index ( _x0,_x1) |Array_index ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in Array_index ( _x0,_x1) |Static_index ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#string _x1 in -let _x2 = o#option (fun o -> o#int32) _x2 in +let _x0 = _self#expression _x0 in +let _x2 = _self#option (fun _self -> unknown) _x2 in Static_index ( _x0,_x1,_x2) |New ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#option (fun o -> o#list (fun o -> o#expression)) _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 in New ( _x0,_x1) |Var ( _x0) -> -let _x0 = o#vident _x0 in +let _x0 = _self#vident _x0 in Var ( _x0) |Fun ( _x0,_x1,_x2,_x3) -> -let _x0 = o#bool _x0 in -let _x1 = o#list (fun o -> o#ident) _x1 in -let _x2 = o#block _x2 in -let _x3 = o#unknown _x3 in +let _x1 = _self#list (fun _self -> _self#ident) _x1 in +let _x2 = _self#block _x2 in Fun ( _x0,_x1,_x2,_x3) -|Str ( _x0,_x1) -> -let _x0 = o#bool _x0 in -let _x1 = o#string _x1 in -Str ( _x0,_x1) -|Unicode ( _x0) -> -let _x0 = o#string _x0 in -Unicode ( _x0) -|Raw_js_code ( _x0) -> -let _x0 = o#unknown _x0 in -Raw_js_code ( _x0) +|Str _ as v -> v +|Unicode _ as v -> v +|Raw_js_code _ as v -> v |Array ( _x0,_x1) -> -let _x0 = o#list (fun o -> o#expression) _x0 in -let _x1 = o#mutable_flag _x1 in +let _x0 = _self#list (fun _self -> _self#expression) _x0 in Array ( _x0,_x1) |Optional_block ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#bool _x1 in +let _x0 = _self#expression _x0 in Optional_block ( _x0,_x1) |Caml_block ( _x0,_x1,_x2,_x3) -> -let _x0 = o#list (fun o -> o#expression) _x0 in -let _x1 = o#mutable_flag _x1 in -let _x2 = o#expression _x2 in -let _x3 = o#tag_info _x3 in +let _x0 = _self#list (fun _self -> _self#expression) _x0 in +let _x2 = _self#expression _x2 in Caml_block ( _x0,_x1,_x2,_x3) |Caml_block_tag ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Caml_block_tag ( _x0) -|Number ( _x0) -> -let _x0 = o#number _x0 in -Number ( _x0) +|Number _ as v -> v |Object ( _x0) -> -let _x0 = o#property_map _x0 in +let _x0 = _self#property_map _x0 in Object ( _x0) -|Undefined -> Undefined -|Null -> Null -method for_ident_expression : for_ident_expression -> for_ident_expression = o#expression -method finish_ident_expression : finish_ident_expression -> finish_ident_expression = o#expression +|Undefined as v -> v +|Null as v -> v +method for_ident_expression : for_ident_expression -> for_ident_expression = _self#expression +method finish_ident_expression : finish_ident_expression -> finish_ident_expression = _self#expression method statement_desc : statement_desc -> statement_desc = function | Block ( _x0) -> -let _x0 = o#block _x0 in +let _x0 = _self#block _x0 in Block ( _x0) |Variable ( _x0) -> -let _x0 = o#variable_declaration _x0 in +let _x0 = _self#variable_declaration _x0 in Variable ( _x0) |Exp ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Exp ( _x0) |If ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#block _x1 in -let _x2 = o#block _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#block _x1 in +let _x2 = _self#block _x2 in If ( _x0,_x1,_x2) |While ( _x0,_x1,_x2,_x3) -> -let _x0 = o#option (fun o -> o#label) _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#block _x2 in -let _x3 = o#unknown _x3 in +let _x0 = _self#option (fun _self -> _self#label) _x0 in +let _x1 = _self#expression _x1 in +let _x2 = _self#block _x2 in While ( _x0,_x1,_x2,_x3) |ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> -let _x0 = o#option (fun o -> o#for_ident_expression) _x0 in -let _x1 = o#finish_ident_expression _x1 in -let _x2 = o#for_ident _x2 in -let _x3 = o#for_direction _x3 in -let _x4 = o#block _x4 in -let _x5 = o#unknown _x5 in +let _x0 = _self#option (fun _self -> _self#for_ident_expression) _x0 in +let _x1 = _self#finish_ident_expression _x1 in +let _x2 = _self#for_ident _x2 in +let _x3 = _self#for_direction _x3 in +let _x4 = _self#block _x4 in ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) |Continue ( _x0) -> -let _x0 = o#label _x0 in +let _x0 = _self#label _x0 in Continue ( _x0) -|Break -> Break +|Break as v -> v |Return ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Return ( _x0) |Int_switch ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#int_clause) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#int_clause) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in Int_switch ( _x0,_x1,_x2) |String_switch ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#string_clause) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#string_clause) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in String_switch ( _x0,_x1,_x2) |Throw ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Throw ( _x0) |Try ( _x0,_x1,_x2) -> -let _x0 = o#block _x0 in -let _x1 = o#option (fun o -> fun ( _x0,_x1) -> let _x0 = o#exception_ident _x0 in let _x1 = o#block _x1 in _x0,_x1) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#block _x0 in +let _x1 = _self#option (fun _self -> fun ( _x0,_x1) -> let _x0 = _self#exception_ident _x0 in let _x1 = _self#block _x1 in _x0,_x1) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in Try ( _x0,_x1,_x2) -|Debugger -> Debugger -method expression : expression -> expression = fun { expression_desc = _x0;comment = _x1} -> let _x0 = o#expression_desc _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in {expression_desc = _x0;comment = _x1} -method statement : statement -> statement = fun { statement_desc = _x0;comment = _x1} -> let _x0 = o#statement_desc _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in {statement_desc = _x0;comment = _x1} -method variable_declaration : variable_declaration -> variable_declaration = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _x0 = o#ident _x0 in -let _x1 = o#option (fun o -> o#expression) _x1 in -let _x2 = o#property _x2 in -let _x3 = o#ident_info _x3 in {ident = _x0;value = _x1;property = _x2;ident_info = _x3} -method string_clause : string_clause -> string_clause = fun ( _x0,_x1) -> let _x0 = o#string _x0 in let _x1 = o#case_clause _x1 in _x0,_x1 -method int_clause : int_clause -> int_clause = fun ( _x0,_x1) -> let _x0 = o#int _x0 in let _x1 = o#case_clause _x1 in _x0,_x1 -method case_clause : case_clause -> case_clause = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _x0 = o#block _x0 in -let _x1 = o#bool _x1 in -let _x2 = o#option (fun o -> o#string) _x2 in {switch_body = _x0;should_break = _x1;comment = _x2} -method block : block -> block = o#list (fun o -> o#statement) -method program : program -> program = fun { block = _x0;exports = _x1;export_set = _x2} -> let _x0 = o#block _x0 in -let _x1 = o#exports _x1 in -let _x2 = o#unknown _x2 in {block = _x0;exports = _x1;export_set = _x2} -method deps_program : deps_program -> deps_program = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _x0 = o#program _x0 in -let _x1 = o#required_modules _x1 in -let _x2 = o#option (fun o -> o#string) _x2 in {program = _x0;modules = _x1;side_effect = _x2} +|Debugger as v -> v +method expression : expression -> expression = fun { expression_desc = _x0;comment = _x1} -> let _x0 = _self#expression_desc _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in {expression_desc = _x0;comment = _x1} +method statement : statement -> statement = fun { statement_desc = _x0;comment = _x1} -> let _x0 = _self#statement_desc _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in {statement_desc = _x0;comment = _x1} +method variable_declaration : variable_declaration -> variable_declaration = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _x0 = _self#ident _x0 in +let _x1 = _self#option (fun _self -> _self#expression) _x1 in {ident = _x0;value = _x1;property = _x2;ident_info = _x3} +method string_clause : string_clause -> string_clause = fun ( _x0,_x1) -> let _x1 = _self#case_clause _x1 in _x0,_x1 +method int_clause : int_clause -> int_clause = fun ( _x0,_x1) -> let _x1 = _self#case_clause _x1 in _x0,_x1 +method case_clause : case_clause -> case_clause = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _x0 = _self#block _x0 in +let _x2 = _self#option (fun _self -> unknown) _x2 in {switch_body = _x0;should_break = _x1;comment = _x2} +method block : block -> block = _self#list (fun _self -> _self#statement) +method program : program -> program = fun { block = _x0;exports = _x1;export_set = _x2} -> let _x0 = _self#block _x0 in {block = _x0;exports = _x1;export_set = _x2} +method deps_program : deps_program -> deps_program = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _x0 = _self#program _x0 in +let _x1 = _self#required_modules _x1 in +let _x2 = _self#option (fun _self -> unknown) _x2 in {program = _x0;modules = _x1;side_effect = _x2} end diff --git a/jscomp/core/js_pass_flatten_and_mark_dead.ml b/jscomp/core/js_pass_flatten_and_mark_dead.ml index 48632126c4..f4da271384 100644 --- a/jscomp/core/js_pass_flatten_and_mark_dead.ml +++ b/jscomp/core/js_pass_flatten_and_mark_dead.ml @@ -43,8 +43,8 @@ type meta_info = let mark_dead_code (js : J.program) : J.program = let ident_use_stats : meta_info Hash_ident.t = Hash_ident.create 17 in - let mark_dead : Js_fold.fold = object (self) - inherit Js_fold.fold + let mark_dead : Js_iter.iter = object (self) + inherit Js_iter.iter method! ident ident = (match Hash_ident.find_opt ident_use_stats ident with | None -> (* First time *) @@ -53,14 +53,13 @@ let mark_dead_code (js : J.program) : J.program = | Some Recursive -> () | Some (Info x) -> Js_op_util.update_used_stats x Used ) - ; self method! variable_declaration vd = match vd.ident_info.used_stats with | Dead_pure - -> self + -> () | Dead_non_pure -> begin match vd.value with - | None -> self + | None -> () | Some x -> self#expression x end | _ -> @@ -68,7 +67,7 @@ let mark_dead_code (js : J.program) : J.program = let pure = match value with | None -> true - | Some x -> ignore (self#expression x); Js_analyzer.no_side_effect_expression x in + | Some x -> (self#expression x); Js_analyzer.no_side_effect_expression x in ( let () = if Set_ident.mem js.export_set ident then @@ -87,9 +86,9 @@ let mark_dead_code (js : J.program) : J.program = | None -> (* First time *) Hash_ident.add ident_use_stats ident (Info ident_info); Js_op_util.update_used_stats ident_info - (if pure then Scanning_pure else Scanning_non_pure)); self + (if pure then Scanning_pure else Scanning_non_pure)) end in - let _ = (mark_dead#program js) in + let () = (mark_dead#program js) in Hash_ident.iter ident_use_stats (fun _id (info : meta_info) -> match info with | Info ({used_stats = Scanning_pure} as info) -> diff --git a/jscomp/core/js_pass_get_used.ml b/jscomp/core/js_pass_get_used.ml index 0385090096..bf25ed159b 100644 --- a/jscomp/core/js_pass_get_used.ml +++ b/jscomp/core/js_pass_get_used.ml @@ -52,22 +52,19 @@ let count_collects (* collect used status*) (stats : int Hash_ident.t) (* collect all def sites *) - (defined_idents : J.variable_declaration Hash_ident.t) : Js_fold.fold + (defined_idents : J.variable_declaration Hash_ident.t) : Js_iter.iter = object (self) - inherit Js_fold.fold - + inherit Js_iter.iter method! variable_declaration ({ident; value ; property = _ ; ident_info = _} as v) = Hash_ident.add defined_idents ident v; match value with - | None -> - self + | None -> () | Some x -> self#expression x - method! ident id = add_use stats id; self - + method! ident id = add_use stats id end @@ -76,5 +73,5 @@ let get_stats (program : J.program) : J.variable_declaration Hash_ident.t let stats : int Hash_ident.t = Hash_ident.create 83 in let defined_idents : J.variable_declaration Hash_ident.t = Hash_ident.create 83 in let my_export_set = program.export_set in - let _ : Js_fold.fold = (count_collects stats defined_idents) #program program in + (count_collects stats defined_idents) #program program; post_process_stats my_export_set defined_idents stats diff --git a/jscomp/main/builtin_cmi_datasets.ml b/jscomp/main/builtin_cmi_datasets.ml index 2feceee4a3..c305bebdde 100644 --- a/jscomp/main/builtin_cmi_datasets.ml +++ b/jscomp/main/builtin_cmi_datasets.ml @@ -1,4 +1,4 @@ -(* 180a946f426a7bdebc6e18e32d9734eb *) +(* 0de2b622a7d93a9203358884b6dfb0cf *) let module_names : string array = Obj.magic ( "Js" (* 5875 *), "Arg" (* 4085 *), @@ -27,7 +27,7 @@ let module_names : string array = Obj.magic ( "Digest" (* 1335 *), "Format" (* 16006 *), "Genlex" (* 726 *), -"Js_exn" (* 1364 *), +"Js_exn" (* 1432 *), "Js_int" (* 1273 *), "Js_obj" (* 677 *), "Lexing" (* 3084 *), @@ -150,7 +150,7 @@ let module_data : string array = Obj.magic ( (* Digest *) "\132\149\166\190\000\000\005#\000\000\001 \000\000\004\006\000\000\003\215\192&Digest\160\177\176\001\004\186!t@\b\000\000,\000@@@A\144\176\179\144\176O&string@@\144@\002\005\245\225\000\000\254@@\176\192&_none_A@\000\255\004\002A@@\160@@A\160\160\176\001\004\187'compare@\192\176\193@\176\179\144\004\024@\144@\002\005\245\225\000\000\249\176\193@\176\179\004\006@\144@\002\005\245\225\000\000\250\176\179\144\176A#int@@\144@\002\005\245\225\000\000\251@\002\005\245\225\000\000\252@\002\005\245\225\000\000\253@\004\026@\160\160\176\001\004\188%equal@\192\176\193@\176\179\004\022@\144@\002\005\245\225\000\000\244\176\193@\176\179\004\027@\144@\002\005\245\225\000\000\245\176\179\144\176E$bool@@\144@\002\005\245\225\000\000\246@\002\005\245\225\000\000\247@\002\005\245\225\000\000\248@\004/@\160\160\176\001\004\189&string@\192\176\193@\176\179\144\004<@\144@\002\005\245\225\000\000\241\176\179\004/@\144@\002\005\245\225\000\000\242@\002\005\245\225\000\000\243@\004=@\160\160\176\001\004\190%bytes@\192\176\193@\176\179\144\176C%bytes@@\144@\002\005\245\225\000\000\238\176\179\004?@\144@\002\005\245\225\000\000\239@\002\005\245\225\000\000\240@\004M@\160\160\176\001\004\191)substring@\192\176\193@\176\179\144\004Z@\144@\002\005\245\225\000\000\231\176\193@\176\179\144\004F@\144@\002\005\245\225\000\000\232\176\193@\176\179\144\004L@\144@\002\005\245\225\000\000\233\176\179\004Y@\144@\002\005\245\225\000\000\234@\002\005\245\225\000\000\235@\002\005\245\225\000\000\236@\002\005\245\225\000\000\237@\004g@\160\160\176\001\004\192(subbytes@\192\176\193@\176\179\144\004*@\144@\002\005\245\225\000\000\224\176\193@\176\179\144\004`@\144@\002\005\245\225\000\000\225\176\193@\176\179\144\004f@\144@\002\005\245\225\000\000\226\176\179\004s@\144@\002\005\245\225\000\000\227@\002\005\245\225\000\000\228@\002\005\245\225\000\000\229@\002\005\245\225\000\000\230@\004\129@\160\160\176\001\004\193'channel@\192\176\193@\176\179\177\144\176@*PervasivesA*in_channel\000\255@\144@\002\005\245\225\000\000\219\176\193@\176\179\144\004~@\144@\002\005\245\225\000\000\220\176\179\004\139@\144@\002\005\245\225\000\000\221@\002\005\245\225\000\000\222@\002\005\245\225\000\000\223\144\224-caml_md5_chanBA \160@\160@@@\004\159@\160\160\176\001\004\194$file@\192\176\193@\176\179\144\004\172@\144@\002\005\245\225\000\000\216\176\179\004\159@\144@\002\005\245\225\000\000\217@\002\005\245\225\000\000\218@\004\173@\160\160\176\001\004\195&output@\192\176\193@\176\179\177\004,+out_channel\000\255@\144@\002\005\245\225\000\000\211\176\193@\176\179\004\176@\144@\002\005\245\225\000\000\212\176\179\144\176F$unit@@\144@\002\005\245\225\000\000\213@\002\005\245\225\000\000\214@\002\005\245\225\000\000\215@\004\196@\160\160\176\001\004\196%input@\192\176\193@\176\179\177\004C*in_channel\000\255@\144@\002\005\245\225\000\000\208\176\179\004\197@\144@\002\005\245\225\000\000\209@\002\005\245\225\000\000\210@\004\211@\160\160\176\001\004\197&to_hex@\192\176\193@\176\179\004\207@\144@\002\005\245\225\000\000\205\176\179\144\004\227@\144@\002\005\245\225\000\000\206@\002\005\245\225\000\000\207@\004\225@\160\160\176\001\004\198(from_hex@\192\176\193@\176\179\144\004\238@\144@\002\005\245\225\000\000\202\176\179\004\225@\144@\002\005\245\225\000\000\203@\002\005\245\225\000\000\204@\004\239@@\160\160&Digest\1440g\162\017DR\249\130\170t\240z\140\164sCu\160\160*Pervasives\1440\161\171\015\212m\226s\245\200\018\157M:VVF\160\160\"Js\14409\154\"!\241\252\216]\177\145cA\131\028\026\200\160\1608CamlinternalFormatBasics\1440\176\204G\0192\227\021\136k\159\234\t\245:us\160\160.Bs_stdlib_mini\1440<\2522V\168\021\178\216\170\252z\175\016r\000\000\012x\000\000,\156\000\000+\012\192&Format\160\177\176\001\004\146)formatter@\b\000\000,\000@@@A@@@\176\192&_none_A@\000\255\004\002A@@\160@@A\160\160\176\001\004\147+pp_open_box@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\250\176\193@\176\179\144\176A#int@@\144@\002\005\245\225\000\000\251\176\179\144\176F$unit@@\144@\002\005\245\225\000\000\252@\002\005\245\225\000\000\253@\002\005\245\225\000\000\254@\004\029@\160\160\176\001\004\148(open_box@\192\176\193@\176\179\144\004\019@\144@\002\005\245\225\000\000\247\176\179\144\004\017@\144@\002\005\245\225\000\000\248@\002\005\245\225\000\000\249@\004,@\160\160\176\001\004\149,pp_close_box@\192\176\193@\176\179\004(@\144@\002\005\245\225\000\000\242\176\193@\176\179\144\004!@\144@\002\005\245\225\000\000\243\176\179\144\004%@\144@\002\005\245\225\000\000\244@\002\005\245\225\000\000\245@\002\005\245\225\000\000\246@\004@@\160\160\176\001\004\150)close_box@\192\176\193@\176\179\144\0040@\144@\002\005\245\225\000\000\239\176\179\144\0044@\144@\002\005\245\225\000\000\240@\002\005\245\225\000\000\241@\004O@\160\160\176\001\004\151,pp_open_hbox@\192\176\193@\176\179\004K@\144@\002\005\245\225\000\000\234\176\193@\176\179\144\004D@\144@\002\005\245\225\000\000\235\176\179\144\004H@\144@\002\005\245\225\000\000\236@\002\005\245\225\000\000\237@\002\005\245\225\000\000\238@\004c@\160\160\176\001\004\152)open_hbox@\192\176\193@\176\179\144\004S@\144@\002\005\245\225\000\000\231\176\179\144\004W@\144@\002\005\245\225\000\000\232@\002\005\245\225\000\000\233@\004r@\160\160\176\001\004\153,pp_open_vbox@\192\176\193@\176\179\004n@\144@\002\005\245\225\000\000\226\176\193@\176\179\144\004m@\144@\002\005\245\225\000\000\227\176\179\144\004k@\144@\002\005\245\225\000\000\228@\002\005\245\225\000\000\229@\002\005\245\225\000\000\230@\004\134@\160\160\176\001\004\154)open_vbox@\192\176\193@\176\179\144\004|@\144@\002\005\245\225\000\000\223\176\179\144\004z@\144@\002\005\245\225\000\000\224@\002\005\245\225\000\000\225@\004\149@\160\160\176\001\004\155-pp_open_hvbox@\192\176\193@\176\179\004\145@\144@\002\005\245\225\000\000\218\176\193@\176\179\144\004\144@\144@\002\005\245\225\000\000\219\176\179\144\004\142@\144@\002\005\245\225\000\000\220@\002\005\245\225\000\000\221@\002\005\245\225\000\000\222@\004\169@\160\160\176\001\004\156*open_hvbox@\192\176\193@\176\179\144\004\159@\144@\002\005\245\225\000\000\215\176\179\144\004\157@\144@\002\005\245\225\000\000\216@\002\005\245\225\000\000\217@\004\184@\160\160\176\001\004\157.pp_open_hovbox@\192\176\193@\176\179\004\180@\144@\002\005\245\225\000\000\210\176\193@\176\179\144\004\179@\144@\002\005\245\225\000\000\211\176\179\144\004\177@\144@\002\005\245\225\000\000\212@\002\005\245\225\000\000\213@\002\005\245\225\000\000\214@\004\204@\160\160\176\001\004\158+open_hovbox@\192\176\193@\176\179\144\004\194@\144@\002\005\245\225\000\000\207\176\179\144\004\192@\144@\002\005\245\225\000\000\208@\002\005\245\225\000\000\209@\004\219@\160\160\176\001\004\159/pp_print_string@\192\176\193@\176\179\004\215@\144@\002\005\245\225\000\000\202\176\193@\176\179\144\176O&string@@\144@\002\005\245\225\000\000\203\176\179\144\004\214@\144@\002\005\245\225\000\000\204@\002\005\245\225\000\000\205@\002\005\245\225\000\000\206@\004\241@\160\160\176\001\004\160,print_string@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\199\176\179\144\004\229@\144@\002\005\245\225\000\000\200@\002\005\245\225\000\000\201@\005\001\000@\160\160\176\001\004\161+pp_print_as@\192\176\193@\176\179\004\252@\144@\002\005\245\225\000\000\192\176\193@\176\179\144\004\251@\144@\002\005\245\225\000\000\193\176\193@\176\179\144\004+@\144@\002\005\245\225\000\000\194\176\179\144\004\255@\144@\002\005\245\225\000\000\195@\002\005\245\225\000\000\196@\002\005\245\225\000\000\197@\002\005\245\225\000\000\198@\005\001\026@\160\160\176\001\004\162(print_as@\192\176\193@\176\179\144\005\001\016@\144@\002\005\245\225\000\000\187\176\193@\176\179\144\004@@\144@\002\005\245\225\000\000\188\176\179\144\005\001\020@\144@\002\005\245\225\000\000\189@\002\005\245\225\000\000\190@\002\005\245\225\000\000\191@\005\001/@\160\160\176\001\004\163,pp_print_int@\192\176\193@\176\179\005\001+@\144@\002\005\245\225\000\000\182\176\193@\176\179\144\005\001*@\144@\002\005\245\225\000\000\183\176\179\144\005\001(@\144@\002\005\245\225\000\000\184@\002\005\245\225\000\000\185@\002\005\245\225\000\000\186@\005\001C@\160\160\176\001\004\164)print_int@\192\176\193@\176\179\144\005\0019@\144@\002\005\245\225\000\000\179\176\179\144\005\0017@\144@\002\005\245\225\000\000\180@\002\005\245\225\000\000\181@\005\001R@\160\160\176\001\004\165.pp_print_float@\192\176\193@\176\179\005\001N@\144@\002\005\245\225\000\000\174\176\193@\176\179\144\176D%float@@\144@\002\005\245\225\000\000\175\176\179\144\005\001M@\144@\002\005\245\225\000\000\176@\002\005\245\225\000\000\177@\002\005\245\225\000\000\178@\005\001h@\160\160\176\001\004\166+print_float@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\171\176\179\144\005\001\\@\144@\002\005\245\225\000\000\172@\002\005\245\225\000\000\173@\005\001w@\160\160\176\001\004\167-pp_print_char@\192\176\193@\176\179\005\001s@\144@\002\005\245\225\000\000\166\176\193@\176\179\144\176B$char@@\144@\002\005\245\225\000\000\167\176\179\144\005\001r@\144@\002\005\245\225\000\000\168@\002\005\245\225\000\000\169@\002\005\245\225\000\000\170@\005\001\141@\160\160\176\001\004\168*print_char@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\163\176\179\144\005\001\129@\144@\002\005\245\225\000\000\164@\002\005\245\225\000\000\165@\005\001\156@\160\160\176\001\004\169-pp_print_bool@\192\176\193@\176\179\005\001\152@\144@\002\005\245\225\000\000\158\176\193@\176\179\144\176E$bool@@\144@\002\005\245\225\000\000\159\176\179\144\005\001\151@\144@\002\005\245\225\000\000\160@\002\005\245\225\000\000\161@\002\005\245\225\000\000\162@\005\001\178@\160\160\176\001\004\170*print_bool@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\155\176\179\144\005\001\166@\144@\002\005\245\225\000\000\156@\002\005\245\225\000\000\157@\005\001\193@\160\160\176\001\004\171.pp_print_space@\192\176\193@\176\179\005\001\189@\144@\002\005\245\225\000\000\150\176\193@\176\179\144\005\001\182@\144@\002\005\245\225\000\000\151\176\179\144\005\001\186@\144@\002\005\245\225\000\000\152@\002\005\245\225\000\000\153@\002\005\245\225\000\000\154@\005\001\213@\160\160\176\001\004\172+print_space@\192\176\193@\176\179\144\005\001\197@\144@\002\005\245\225\000\000\147\176\179\144\005\001\201@\144@\002\005\245\225\000\000\148@\002\005\245\225\000\000\149@\005\001\228@\160\160\176\001\004\173,pp_print_cut@\192\176\193@\176\179\005\001\224@\144@\002\005\245\225\000\000\142\176\193@\176\179\144\005\001\217@\144@\002\005\245\225\000\000\143\176\179\144\005\001\221@\144@\002\005\245\225\000\000\144@\002\005\245\225\000\000\145@\002\005\245\225\000\000\146@\005\001\248@\160\160\176\001\004\174)print_cut@\192\176\193@\176\179\144\005\001\232@\144@\002\005\245\225\000\000\139\176\179\144\005\001\236@\144@\002\005\245\225\000\000\140@\002\005\245\225\000\000\141@\005\002\007@\160\160\176\001\004\175.pp_print_break@\192\176\193@\176\179\005\002\003@\144@\002\005\245\225\000\000\132\176\193@\176\179\144\005\002\002@\144@\002\005\245\225\000\000\133\176\193@\176\179\144\005\002\b@\144@\002\005\245\225\000\000\134\176\179\144\005\002\006@\144@\002\005\245\225\000\000\135@\002\005\245\225\000\000\136@\002\005\245\225\000\000\137@\002\005\245\225\000\000\138@\005\002!@\160\160\176\001\004\176+print_break@\192\176\193@\176\179\144\005\002\023@\144@\002\005\245\225\000\001\255\127\176\193@\176\179\144\005\002\029@\144@\002\005\245\225\000\000\128\176\179\144\005\002\027@\144@\002\005\245\225\000\000\129@\002\005\245\225\000\000\130@\002\005\245\225\000\000\131@\005\0026@\160\160\176\001\004\1770pp_force_newline@\192\176\193@\176\179\005\0022@\144@\002\005\245\225\000\001\255z\176\193@\176\179\144\005\002+@\144@\002\005\245\225\000\001\255{\176\179\144\005\002/@\144@\002\005\245\225\000\001\255|@\002\005\245\225\000\001\255}@\002\005\245\225\000\001\255~@\005\002J@\160\160\176\001\004\178-force_newline@\192\176\193@\176\179\144\005\002:@\144@\002\005\245\225\000\001\255w\176\179\144\005\002>@\144@\002\005\245\225\000\001\255x@\002\005\245\225\000\001\255y@\005\002Y@\160\160\176\001\004\1793pp_print_if_newline@\192\176\193@\176\179\005\002U@\144@\002\005\245\225\000\001\255r\176\193@\176\179\144\005\002N@\144@\002\005\245\225\000\001\255s\176\179\144\005\002R@\144@\002\005\245\225\000\001\255t@\002\005\245\225\000\001\255u@\002\005\245\225\000\001\255v@\005\002m@\160\160\176\001\004\1800print_if_newline@\192\176\193@\176\179\144\005\002]@\144@\002\005\245\225\000\001\255o\176\179\144\005\002a@\144@\002\005\245\225\000\001\255p@\002\005\245\225\000\001\255q@\005\002|@\160\160\176\001\004\181.pp_print_flush@\192\176\193@\176\179\005\002x@\144@\002\005\245\225\000\001\255j\176\193@\176\179\144\005\002q@\144@\002\005\245\225\000\001\255k\176\179\144\005\002u@\144@\002\005\245\225\000\001\255l@\002\005\245\225\000\001\255m@\002\005\245\225\000\001\255n@\005\002\144@\160\160\176\001\004\182+print_flush@\192\176\193@\176\179\144\005\002\128@\144@\002\005\245\225\000\001\255g\176\179\144\005\002\132@\144@\002\005\245\225\000\001\255h@\002\005\245\225\000\001\255i@\005\002\159@\160\160\176\001\004\1830pp_print_newline@\192\176\193@\176\179\005\002\155@\144@\002\005\245\225\000\001\255b\176\193@\176\179\144\005\002\148@\144@\002\005\245\225\000\001\255c\176\179\144\005\002\152@\144@\002\005\245\225\000\001\255d@\002\005\245\225\000\001\255e@\002\005\245\225\000\001\255f@\005\002\179@\160\160\176\001\004\184-print_newline@\192\176\193@\176\179\144\005\002\163@\144@\002\005\245\225\000\001\255_\176\179\144\005\002\167@\144@\002\005\245\225\000\001\255`@\002\005\245\225\000\001\255a@\005\002\194@\160\160\176\001\004\185-pp_set_margin@\192\176\193@\176\179\005\002\190@\144@\002\005\245\225\000\001\255Z\176\193@\176\179\144\005\002\189@\144@\002\005\245\225\000\001\255[\176\179\144\005\002\187@\144@\002\005\245\225\000\001\255\\@\002\005\245\225\000\001\255]@\002\005\245\225\000\001\255^@\005\002\214@\160\160\176\001\004\186*set_margin@\192\176\193@\176\179\144\005\002\204@\144@\002\005\245\225\000\001\255W\176\179\144\005\002\202@\144@\002\005\245\225\000\001\255X@\002\005\245\225\000\001\255Y@\005\002\229@\160\160\176\001\004\187-pp_get_margin@\192\176\193@\176\179\005\002\225@\144@\002\005\245\225\000\001\255R\176\193@\176\179\144\005\002\218@\144@\002\005\245\225\000\001\255S\176\179\144\005\002\228@\144@\002\005\245\225\000\001\255T@\002\005\245\225\000\001\255U@\002\005\245\225\000\001\255V@\005\002\249@\160\160\176\001\004\188*get_margin@\192\176\193@\176\179\144\005\002\233@\144@\002\005\245\225\000\001\255O\176\179\144\005\002\243@\144@\002\005\245\225\000\001\255P@\002\005\245\225\000\001\255Q@\005\003\b@\160\160\176\001\004\1891pp_set_max_indent@\192\176\193@\176\179\005\003\004@\144@\002\005\245\225\000\001\255J\176\193@\176\179\144\005\003\003@\144@\002\005\245\225\000\001\255K\176\179\144\005\003\001@\144@\002\005\245\225\000\001\255L@\002\005\245\225\000\001\255M@\002\005\245\225\000\001\255N@\005\003\028@\160\160\176\001\004\190.set_max_indent@\192\176\193@\176\179\144\005\003\018@\144@\002\005\245\225\000\001\255G\176\179\144\005\003\016@\144@\002\005\245\225\000\001\255H@\002\005\245\225\000\001\255I@\005\003+@\160\160\176\001\004\1911pp_get_max_indent@\192\176\193@\176\179\005\003'@\144@\002\005\245\225\000\001\255B\176\193@\176\179\144\005\003 @\144@\002\005\245\225\000\001\255C\176\179\144\005\003*@\144@\002\005\245\225\000\001\255D@\002\005\245\225\000\001\255E@\002\005\245\225\000\001\255F@\005\003?@\160\160\176\001\004\192.get_max_indent@\192\176\193@\176\179\144\005\003/@\144@\002\005\245\225\000\001\255?\176\179\144\005\0039@\144@\002\005\245\225\000\001\255@@\002\005\245\225\000\001\255A@\005\003N@\160\160\176\001\004\1930pp_set_max_boxes@\192\176\193@\176\179\005\003J@\144@\002\005\245\225\000\001\255:\176\193@\176\179\144\005\003I@\144@\002\005\245\225\000\001\255;\176\179\144\005\003G@\144@\002\005\245\225\000\001\255<@\002\005\245\225\000\001\255=@\002\005\245\225\000\001\255>@\005\003b@\160\160\176\001\004\194-set_max_boxes@\192\176\193@\176\179\144\005\003X@\144@\002\005\245\225\000\001\2557\176\179\144\005\003V@\144@\002\005\245\225\000\001\2558@\002\005\245\225\000\001\2559@\005\003q@\160\160\176\001\004\1950pp_get_max_boxes@\192\176\193@\176\179\005\003m@\144@\002\005\245\225\000\001\2552\176\193@\176\179\144\005\003f@\144@\002\005\245\225\000\001\2553\176\179\144\005\003p@\144@\002\005\245\225\000\001\2554@\002\005\245\225\000\001\2555@\002\005\245\225\000\001\2556@\005\003\133@\160\160\176\001\004\196-get_max_boxes@\192\176\193@\176\179\144\005\003u@\144@\002\005\245\225\000\001\255/\176\179\144\005\003\127@\144@\002\005\245\225\000\001\2550@\002\005\245\225\000\001\2551@\005\003\148@\160\160\176\001\004\1971pp_over_max_boxes@\192\176\193@\176\179\005\003\144@\144@\002\005\245\225\000\001\255*\176\193@\176\179\144\005\003\137@\144@\002\005\245\225\000\001\255+\176\179\144\005\001\252@\144@\002\005\245\225\000\001\255,@\002\005\245\225\000\001\255-@\002\005\245\225\000\001\255.@\005\003\168@\160\160\176\001\004\198.over_max_boxes@\192\176\193@\176\179\144\005\003\152@\144@\002\005\245\225\000\001\255'\176\179\144\005\002\011@\144@\002\005\245\225\000\001\255(@\002\005\245\225\000\001\255)@\005\003\183@\160\160\176\001\004\199,pp_open_tbox@\192\176\193@\176\179\005\003\179@\144@\002\005\245\225\000\001\255\"\176\193@\176\179\144\005\003\172@\144@\002\005\245\225\000\001\255#\176\179\144\005\003\176@\144@\002\005\245\225\000\001\255$@\002\005\245\225\000\001\255%@\002\005\245\225\000\001\255&@\005\003\203@\160\160\176\001\004\200)open_tbox@\192\176\193@\176\179\144\005\003\187@\144@\002\005\245\225\000\001\255\031\176\179\144\005\003\191@\144@\002\005\245\225\000\001\255 @\002\005\245\225\000\001\255!@\005\003\218@\160\160\176\001\004\201-pp_close_tbox@\192\176\193@\176\179\005\003\214@\144@\002\005\245\225\000\001\255\026\176\193@\176\179\144\005\003\207@\144@\002\005\245\225\000\001\255\027\176\179\144\005\003\211@\144@\002\005\245\225\000\001\255\028@\002\005\245\225\000\001\255\029@\002\005\245\225\000\001\255\030@\005\003\238@\160\160\176\001\004\202*close_tbox@\192\176\193@\176\179\144\005\003\222@\144@\002\005\245\225\000\001\255\023\176\179\144\005\003\226@\144@\002\005\245\225\000\001\255\024@\002\005\245\225\000\001\255\025@\005\003\253@\160\160\176\001\004\203*pp_set_tab@\192\176\193@\176\179\005\003\249@\144@\002\005\245\225\000\001\255\018\176\193@\176\179\144\005\003\242@\144@\002\005\245\225\000\001\255\019\176\179\144\005\003\246@\144@\002\005\245\225\000\001\255\020@\002\005\245\225\000\001\255\021@\002\005\245\225\000\001\255\022@\005\004\017@\160\160\176\001\004\204'set_tab@\192\176\193@\176\179\144\005\004\001@\144@\002\005\245\225\000\001\255\015\176\179\144\005\004\005@\144@\002\005\245\225\000\001\255\016@\002\005\245\225\000\001\255\017@\005\004 @\160\160\176\001\004\205,pp_print_tab@\192\176\193@\176\179\005\004\028@\144@\002\005\245\225\000\001\255\n\176\193@\176\179\144\005\004\021@\144@\002\005\245\225\000\001\255\011\176\179\144\005\004\025@\144@\002\005\245\225\000\001\255\012@\002\005\245\225\000\001\255\r@\002\005\245\225\000\001\255\014@\005\0044@\160\160\176\001\004\206)print_tab@\192\176\193@\176\179\144\005\004$@\144@\002\005\245\225\000\001\255\007\176\179\144\005\004(@\144@\002\005\245\225\000\001\255\b@\002\005\245\225\000\001\255\t@\005\004C@\160\160\176\001\004\207/pp_print_tbreak@\192\176\193@\176\179\005\004?@\144@\002\005\245\225\000\001\255\000\176\193@\176\179\144\005\004>@\144@\002\005\245\225\000\001\255\001\176\193@\176\179\144\005\004D@\144@\002\005\245\225\000\001\255\002\176\179\144\005\004B@\144@\002\005\245\225\000\001\255\003@\002\005\245\225\000\001\255\004@\002\005\245\225\000\001\255\005@\002\005\245\225\000\001\255\006@\005\004]@\160\160\176\001\004\208,print_tbreak@\192\176\193@\176\179\144\005\004S@\144@\002\005\245\225\000\001\254\251\176\193@\176\179\144\005\004Y@\144@\002\005\245\225\000\001\254\252\176\179\144\005\004W@\144@\002\005\245\225\000\001\254\253@\002\005\245\225\000\001\254\254@\002\005\245\225\000\001\254\255@\005\004r@\160\160\176\001\004\2094pp_set_ellipsis_text@\192\176\193@\176\179\005\004n@\144@\002\005\245\225\000\001\254\246\176\193@\176\179\144\005\003\151@\144@\002\005\245\225\000\001\254\247\176\179\144\005\004k@\144@\002\005\245\225\000\001\254\248@\002\005\245\225\000\001\254\249@\002\005\245\225\000\001\254\250@\005\004\134@\160\160\176\001\004\2101set_ellipsis_text@\192\176\193@\176\179\144\005\003\166@\144@\002\005\245\225\000\001\254\243\176\179\144\005\004z@\144@\002\005\245\225\000\001\254\244@\002\005\245\225\000\001\254\245@\005\004\149@\160\160\176\001\004\2114pp_get_ellipsis_text@\192\176\193@\176\179\005\004\145@\144@\002\005\245\225\000\001\254\238\176\193@\176\179\144\005\004\138@\144@\002\005\245\225\000\001\254\239\176\179\144\005\003\190@\144@\002\005\245\225\000\001\254\240@\002\005\245\225\000\001\254\241@\002\005\245\225\000\001\254\242@\005\004\169@\160\160\176\001\004\2121get_ellipsis_text@\192\176\193@\176\179\144\005\004\153@\144@\002\005\245\225\000\001\254\235\176\179\144\005\003\205@\144@\002\005\245\225\000\001\254\236@\002\005\245\225\000\001\254\237@\005\004\184@\160\177\176\001\004\213#tag@\b\000\000,\000@@@A\144\176\179\144\005\003\215@\144@\002\005\245\225\000\001\254\234@@\005\004\194@@\005\004\191A\160\160\176\001\004\214+pp_open_tag@\192\176\193@\176\179\005\004\190@\144@\002\005\245\225\000\001\254\229\176\193@\176\179\144\005\003\231@\144@\002\005\245\225\000\001\254\230\176\179\144\005\004\187@\144@\002\005\245\225\000\001\254\231@\002\005\245\225\000\001\254\232@\002\005\245\225\000\001\254\233@\005\004\214@\160\160\176\001\004\215(open_tag@\192\176\193@\176\179\144\004&@\144@\002\005\245\225\000\001\254\226\176\179\144\005\004\202@\144@\002\005\245\225\000\001\254\227@\002\005\245\225\000\001\254\228@\005\004\229@\160\160\176\001\004\216,pp_close_tag@\192\176\193@\176\179\005\004\225@\144@\002\005\245\225\000\001\254\221\176\193@\176\179\144\005\004\218@\144@\002\005\245\225\000\001\254\222\176\179\144\005\004\222@\144@\002\005\245\225\000\001\254\223@\002\005\245\225\000\001\254\224@\002\005\245\225\000\001\254\225@\005\004\249@\160\160\176\001\004\217)close_tag@\192\176\193@\176\179\144\005\004\233@\144@\002\005\245\225\000\001\254\218\176\179\144\005\004\237@\144@\002\005\245\225\000\001\254\219@\002\005\245\225\000\001\254\220@\005\005\b@\160\160\176\001\004\218+pp_set_tags@\192\176\193@\176\179\005\005\004@\144@\002\005\245\225\000\001\254\213\176\193@\176\179\144\005\003l@\144@\002\005\245\225\000\001\254\214\176\179\144\005\005\001@\144@\002\005\245\225\000\001\254\215@\002\005\245\225\000\001\254\216@\002\005\245\225\000\001\254\217@\005\005\028@\160\160\176\001\004\219(set_tags@\192\176\193@\176\179\144\005\003{@\144@\002\005\245\225\000\001\254\210\176\179\144\005\005\016@\144@\002\005\245\225\000\001\254\211@\002\005\245\225\000\001\254\212@\005\005+@\160\160\176\001\004\2201pp_set_print_tags@\192\176\193@\176\179\005\005'@\144@\002\005\245\225\000\001\254\205\176\193@\176\179\144\005\003\143@\144@\002\005\245\225\000\001\254\206\176\179\144\005\005$@\144@\002\005\245\225\000\001\254\207@\002\005\245\225\000\001\254\208@\002\005\245\225\000\001\254\209@\005\005?@\160\160\176\001\004\221.set_print_tags@\192\176\193@\176\179\144\005\003\158@\144@\002\005\245\225\000\001\254\202\176\179\144\005\0053@\144@\002\005\245\225\000\001\254\203@\002\005\245\225\000\001\254\204@\005\005N@\160\160\176\001\004\2220pp_set_mark_tags@\192\176\193@\176\179\005\005J@\144@\002\005\245\225\000\001\254\197\176\193@\176\179\144\005\003\178@\144@\002\005\245\225\000\001\254\198\176\179\144\005\005G@\144@\002\005\245\225\000\001\254\199@\002\005\245\225\000\001\254\200@\002\005\245\225\000\001\254\201@\005\005b@\160\160\176\001\004\223-set_mark_tags@\192\176\193@\176\179\144\005\003\193@\144@\002\005\245\225\000\001\254\194\176\179\144\005\005V@\144@\002\005\245\225\000\001\254\195@\002\005\245\225\000\001\254\196@\005\005q@\160\160\176\001\004\2241pp_get_print_tags@\192\176\193@\176\179\005\005m@\144@\002\005\245\225\000\001\254\189\176\193@\176\179\144\005\005f@\144@\002\005\245\225\000\001\254\190\176\179\144\005\003\217@\144@\002\005\245\225\000\001\254\191@\002\005\245\225\000\001\254\192@\002\005\245\225\000\001\254\193@\005\005\133@\160\160\176\001\004\225.get_print_tags@\192\176\193@\176\179\144\005\005u@\144@\002\005\245\225\000\001\254\186\176\179\144\005\003\232@\144@\002\005\245\225\000\001\254\187@\002\005\245\225\000\001\254\188@\005\005\148@\160\160\176\001\004\2260pp_get_mark_tags@\192\176\193@\176\179\005\005\144@\144@\002\005\245\225\000\001\254\181\176\193@\176\179\144\005\005\137@\144@\002\005\245\225\000\001\254\182\176\179\144\005\003\252@\144@\002\005\245\225\000\001\254\183@\002\005\245\225\000\001\254\184@\002\005\245\225\000\001\254\185@\005\005\168@\160\160\176\001\004\227-get_mark_tags@\192\176\193@\176\179\144\005\005\152@\144@\002\005\245\225\000\001\254\178\176\179\144\005\004\011@\144@\002\005\245\225\000\001\254\179@\002\005\245\225\000\001\254\180@\005\005\183@\160\160\176\001\004\228set_formatter_output_functions@\192\176\193@\176\193@\176\179\144\005\0056@\144@\002\005\245\225\000\001\254\142\176\193@\176\179\144\005\006\018@\144@\002\005\245\225\000\001\254\143\176\193@\176\179\144\005\006\024@\144@\002\005\245\225\000\001\254\144\176\179\144\005\006\022@\144@\002\005\245\225\000\001\254\145@\002\005\245\225\000\001\254\146@\002\005\245\225\000\001\254\147@\002\005\245\225\000\001\254\148\176\193@\176\193@\176\179\144\005\006\030@\144@\002\005\245\225\000\001\254\149\176\179\144\005\006\"@\144@\002\005\245\225\000\001\254\150@\002\005\245\225\000\001\254\151\176\179\144\005\006&@\144@\002\005\245\225\000\001\254\152@\002\005\245\225\000\001\254\153@\002\005\245\225\000\001\254\154@\005\006A@\160\160\176\001\004\232\t!pp_get_formatter_output_functions@\192\176\193@\176\179\005\006=@\144@\002\005\245\225\000\001\254\127\176\193@\176\179\144\005\0066@\144@\002\005\245\225\000\001\254\128\176\146\160\176\193@\176\179\144\005\005o@\144@\002\005\245\225\000\001\254\132\176\193@\176\179\144\005\006K@\144@\002\005\245\225\000\001\254\133\176\193@\176\179\144\005\006Q@\144@\002\005\245\225\000\001\254\134\176\179\144\005\006O@\144@\002\005\245\225\000\001\254\135@\002\005\245\225\000\001\254\136@\002\005\245\225\000\001\254\137@\002\005\245\225\000\001\254\138\160\176\193@\176\179\144\005\006V@\144@\002\005\245\225\000\001\254\129\176\179\144\005\006Z@\144@\002\005\245\225\000\001\254\130@\002\005\245\225\000\001\254\131@\002\005\245\225\000\001\254\139@\002\005\245\225\000\001\254\140@\002\005\245\225\000\001\254\141@\005\006u@\160\160\176\001\004\233>get_formatter_output_functions@\192\176\193@\176\179\144\005\006e@\144@\002\005\245\225\000\001\254r\176\146\160\176\193@\176\179\144\005\005\158@\144@\002\005\245\225\000\001\254v\176\193@\176\179\144\005\006z@\144@\002\005\245\225\000\001\254w\176\193@\176\179\144\005\006\128@\144@\002\005\245\225\000\001\254x\176\179\144\005\006~@\144@\002\005\245\225\000\001\254y@\002\005\245\225\000\001\254z@\002\005\245\225\000\001\254{@\002\005\245\225\000\001\254|\160\176\193@\176\179\144\005\006\133@\144@\002\005\245\225\000\001\254s\176\179\144\005\006\137@\144@\002\005\245\225\000\001\254t@\002\005\245\225\000\001\254u@\002\005\245\225\000\001\254}@\002\005\245\225\000\001\254~@\005\006\164@\160\177\176\001\004\2347formatter_out_functions@\b\000\000,\000@@\160\160\208\176\001\004C*out_string@@\176\193@\176\179\144\005\005\201@\144@\002\005\245\225\000\001\254k\176\193@\176\179\144\005\006\165@\144@\002\005\245\225\000\001\254l\176\193@\176\179\144\005\006\171@\144@\002\005\245\225\000\001\254m\176\179\144\005\006\169@\144@\002\005\245\225\000\001\254n@\002\005\245\225\000\001\254o@\002\005\245\225\000\001\254p@\002\005\245\225\000\001\254q\005\006\196@\160\208\176\001\004D)out_flush@@\176\193@\176\179\144\005\006\179@\144@\002\005\245\225\000\001\254h\176\179\144\005\006\183@\144@\002\005\245\225\000\001\254i@\002\005\245\225\000\001\254j\005\006\210@\160\208\176\001\004E+out_newline@@\176\193@\176\179\144\005\006\193@\144@\002\005\245\225\000\001\254e\176\179\144\005\006\197@\144@\002\005\245\225\000\001\254f@\002\005\245\225\000\001\254g\005\006\224@\160\208\176\001\004F*out_spaces@@\176\193@\176\179\144\005\006\213@\144@\002\005\245\225\000\001\254b\176\179\144\005\006\211@\144@\002\005\245\225\000\001\254c@\002\005\245\225\000\001\254d\005\006\238@\160\208\176\001\004G*out_indent@@\176\193@\176\179\144\005\006\227@\144@\002\005\245\225\000\001\254_\176\179\144\005\006\225@\144@\002\005\245\225\000\001\254`@\002\005\245\225\000\001\254a\005\006\252@@@A@@@\005\006\252@@\005\006\249A\160\160\176\001\004\235>pp_set_formatter_out_functions@\192\176\193@\176\179\005\006\248@\144@\002\005\245\225\000\001\254Z\176\193@\176\179\144\004e@\144@\002\005\245\225\000\001\254[\176\179\144\005\006\245@\144@\002\005\245\225\000\001\254\\@\002\005\245\225\000\001\254]@\002\005\245\225\000\001\254^@\005\007\016@\160\160\176\001\004\236;set_formatter_out_functions@\192\176\193@\176\179\004\015@\144@\002\005\245\225\000\001\254W\176\179\144\005\007\003@\144@\002\005\245\225\000\001\254X@\002\005\245\225\000\001\254Y@\005\007\030@\160\160\176\001\004\237>pp_get_formatter_out_functions@\192\176\193@\176\179\005\007\026@\144@\002\005\245\225\000\001\254R\176\193@\176\179\144\005\007\019@\144@\002\005\245\225\000\001\254S\176\179\004&@\144@\002\005\245\225\000\001\254T@\002\005\245\225\000\001\254U@\002\005\245\225\000\001\254V@\005\0071@\160\160\176\001\004\238;get_formatter_out_functions@\192\176\193@\176\179\144\005\007!@\144@\002\005\245\225\000\001\254O\176\179\0044@\144@\002\005\245\225\000\001\254P@\002\005\245\225\000\001\254Q@\005\007?@\160\177\176\001\004\2397formatter_tag_functions@\b\000\000,\000@@\160\160\208\176\001\004M-mark_open_tag@@\176\193@\176\179\005\002n@\144@\002\005\245\225\000\001\254L\176\179\144\005\006g@\144@\002\005\245\225\000\001\254M@\002\005\245\225\000\001\254N\005\007R@\160\208\176\001\004N.mark_close_tag@@\176\193@\176\179\005\002{@\144@\002\005\245\225\000\001\254I\176\179\144\005\006t@\144@\002\005\245\225\000\001\254J@\002\005\245\225\000\001\254K\005\007_@\160\208\176\001\004O.print_open_tag@@\176\193@\176\179\005\002\136@\144@\002\005\245\225\000\001\254F\176\179\144\005\007Q@\144@\002\005\245\225\000\001\254G@\002\005\245\225\000\001\254H\005\007l@\160\208\176\001\004P/print_close_tag@@\176\193@\176\179\005\002\149@\144@\002\005\245\225\000\001\254C\176\179\144\005\007^@\144@\002\005\245\225\000\001\254D@\002\005\245\225\000\001\254E\005\007y@@@A@@@\005\007y@@\005\007vA\160\160\176\001\004\240>pp_set_formatter_tag_functions@\192\176\193@\176\179\005\007u@\144@\002\005\245\225\000\001\254>\176\193@\176\179\144\004G@\144@\002\005\245\225\000\001\254?\176\179\144\005\007r@\144@\002\005\245\225\000\001\254@@\002\005\245\225\000\001\254A@\002\005\245\225\000\001\254B@\005\007\141@\160\160\176\001\004\241;set_formatter_tag_functions@\192\176\193@\176\179\004\015@\144@\002\005\245\225\000\001\254;\176\179\144\005\007\128@\144@\002\005\245\225\000\001\254<@\002\005\245\225\000\001\254=@\005\007\155@\160\160\176\001\004\242>pp_get_formatter_tag_functions@\192\176\193@\176\179\005\007\151@\144@\002\005\245\225\000\001\2546\176\193@\176\179\144\005\007\144@\144@\002\005\245\225\000\001\2547\176\179\004&@\144@\002\005\245\225\000\001\2548@\002\005\245\225\000\001\2549@\002\005\245\225\000\001\254:@\005\007\174@\160\160\176\001\004\243;get_formatter_tag_functions@\192\176\193@\176\179\144\005\007\158@\144@\002\005\245\225\000\001\2543\176\179\0044@\144@\002\005\245\225\000\001\2544@\002\005\245\225\000\001\2545@\005\007\188@\160\160\176\001\004\2448formatter_of_out_channel@\192\176\193@\176\179\177\144\176@*PervasivesA+out_channel\000\255@\144@\002\005\245\225\000\001\2540\176\179\005\007\192@\144@\002\005\245\225\000\001\2541@\002\005\245\225\000\001\2542@\005\007\206@\160\160\176\001\004\245-std_formatter@\192\176\179\005\007\200@\144@\002\005\245\225\000\001\254/@\005\007\214@\160\160\176\001\004\246-err_formatter@\192\176\179\005\007\208@\144@\002\005\245\225\000\001\254.@\005\007\222@\160\160\176\001\004\2473formatter_of_buffer@\192\176\193@\176\179\177\144\176@&BufferA!t\000\255@\144@\002\005\245\225\000\001\254+\176\179\005\007\226@\144@\002\005\245\225\000\001\254,@\002\005\245\225\000\001\254-@\005\007\240@\160\160\176\001\004\248&stdbuf@\192\176\179\177\144\176@&BufferA!t\000\255@\144@\002\005\245\225\000\001\254*@\005\007\253@\160\160\176\001\004\249-str_formatter@\192\176\179\005\007\247@\144@\002\005\245\225\000\001\254)@\005\b\005@\160\160\176\001\004\2503flush_str_formatter@\192\176\193@\176\179\144\005\007\245@\144@\002\005\245\225\000\001\254&\176\179\144\005\007)@\144@\002\005\245\225\000\001\254'@\002\005\245\225\000\001\254(@\005\b\020@\160\160\176\001\004\251.make_formatter@\192\176\193@\176\193@\176\179\144\005\0076@\144@\002\005\245\225\000\001\254\025\176\193@\176\179\144\005\b\018@\144@\002\005\245\225\000\001\254\026\176\193@\176\179\144\005\b\024@\144@\002\005\245\225\000\001\254\027\176\179\144\005\b\022@\144@\002\005\245\225\000\001\254\028@\002\005\245\225\000\001\254\029@\002\005\245\225\000\001\254\030@\002\005\245\225\000\001\254\031\176\193@\176\193@\176\179\144\005\b\030@\144@\002\005\245\225\000\001\254 \176\179\144\005\b\"@\144@\002\005\245\225\000\001\254!@\002\005\245\225\000\001\254\"\176\179\005\b2@\144@\002\005\245\225\000\001\254#@\002\005\245\225\000\001\254$@\002\005\245\225\000\001\254%@\005\b@@\160\160\176\001\004\252:formatter_of_out_functions@\192\176\193@\176\179\005\001?@\144@\002\005\245\225\000\001\254\022\176\179\005\b?@\144@\002\005\245\225\000\001\254\023@\002\005\245\225\000\001\254\024@\005\bM@\160\177\176\001\004\2534symbolic_output_item@\b\000\000,\000@@\145\160\208\176\001\004_,Output_flush@\144@@\005\bX@\160\208\176\001\004`.Output_newline@\144@@\005\b]@\160\208\176\001\004a-Output_string@\144\160\176\179\144\005\007|@\144@\002\005\245\225\000\001\254\021@@\005\bg@\160\208\176\001\004b-Output_spaces@\144\160\176\179\144\005\b\\@\144@\002\005\245\225\000\001\254\020@@\005\bq@\160\208\176\001\004c-Output_indent@\144\160\176\179\144\005\bf@\144@\002\005\245\225\000\001\254\019@@\005\b{@@A@@@\005\b{@@\005\bxA\160\177\176\001\004\2546symbolic_output_buffer@\b\000\000,\000@@@A@@@\005\b\128@@\005\b}A\160\160\176\001\004\255;make_symbolic_output_buffer@\192\176\193@\176\179\144\005\bp@\144@\002\005\245\225\000\001\254\016\176\179\144\004\017@\144@\002\005\245\225\000\001\254\017@\002\005\245\225\000\001\254\018@\005\b\143@\160\160\176\001\005\000\160\176\193@\176\179\144\005\012\031@\144@\002\005\245\225\000\001\2539\176\179\144\005\012\029@\144@\002\005\245\225\000\001\253:@\002\005\245\225\000\001\253;@\002\005\245\225\000\001\253I@\002\005\245\225\000\001\253J@\002\005\245\225\000\001\253K@\005\0128\160\160\1600ocaml.deprecated\005\012<\144\160\160\160\176\145\162\t2Use Format.pp_get_formatter_out_functions instead.@\005\012D@@\005\012D@@@\160\160&Format\1440\206\172wan\183\020\0175:\154\1597\144\241w\160\160%Uchar\1440\172\0161\143?\002\000\000\135@\192\005\001\250\001\004=\002\000\000\135>\002\000\000\135b@\160BA\176get_formatter_output_functions\144\160\160A@@@\176>pp_get_formatter_out_functions\144\160\160B@@@\176>pp_get_formatter_tag_functions\144\160\160B@@@\176>pp_set_formatter_out_functions\144\160\160B@@@\176>pp_set_formatter_tag_functions\144\160\160B@@@\176>set_formatter_output_functions\144\160\160B@@@\176\t!pp_get_formatter_output_functions\144\160\160B@@@\176\t!pp_set_formatter_output_functions\144\160\160C@@@\176\t\"get_all_formatter_output_functions\144\160\160A@@@\176\t\"set_all_formatter_output_functions\144\160\160D@@@\176\t#formatter_of_symbolic_output_buffer\144\160\160A@@@\176\t%pp_get_all_formatter_output_functions\144\160\160B@@@\176\t%pp_set_all_formatter_output_functions\144\160\160E@@@@", (* Genlex *)"\132\149\166\190\000\000\000\024\000\000\000\b\000\000\000\024\000\000\000\023\160\144\176*make_lexer\144\160\160A\160A@@@A", -(* Js_exn *)"\132\149\166\190\000\000\003\144\000\000\000\214\000\000\002\244\000\000\002\213\160\240\176*raiseError\144\160\160A@A\144\148\192A\160\176\001\003\249#str@@\151\176C\160\151\176\181%Error\160\160AA@\182%Error@@\160\144\004\015@\176\1920others/js_exn.mlq\001\007z\001\007\142\192\004\002q\001\007z\001\007\155@@\176\192\004\004q\001\007z\001\007|\192\004\005q\001\007z\001\007\171@\160BA\176-raiseUriError\144\160\160A@A\144\148\192A\160\176\001\004\017#str@@\151\176C\160\151\176\181(URIError\160\004 @\182(URIError@@\160\144\004\014@\176\192\004\031\000V\001\011}\001\011\144\192\004 \000V\001\011}\001\011\162@@\176\192\004\"\000V\001\011}\001\011\127\192\004#\000V\001\011}\001\011\163@\160BA\176.raiseEvalError\144\160\160A@A\144\148\192A\160\176\001\003\253#str@@\151\176C\160\151\176\181)EvalError\160\004>@\182)EvalError@@\160\144\004\014@\176\192\004=w\001\b\031\001\b3\192\004>w\001\b\031\001\bD@@\176\192\004@w\001\b\031\001\b!\192\004Aw\001\b\031\001\bY@\160BA\176.raiseTypeError\144\160\160A@A\144\148\192A\160\176\001\004\r#str@@\151\176C\160\151\176\181)TypeError\160\004\\@\182)TypeError@@\160\144\004\014@\176\192\004[\000P\001\n\231\001\n\250\192\004\\\000P\001\n\231\001\011\r@@\176\192\004^\000P\001\n\231\001\n\233\192\004_\000P\001\n\231\001\011\014@\160BA\176/raiseRangeError\144\160\160A@A\144\148\192A\160\176\001\004\001#str@@\151\176C\160\151\176\181*RangeError\160\004z@\182*RangeError@@\160\144\004\014@\176\192\004y}\001\b\211\001\b\231\192\004z}\001\b\211\001\b\249@@\176\192\004|}\001\b\211\001\b\213\192\004}}\001\b\211\001\t\015@\160BA\1760raiseSyntaxError\144\160\160A@A\144\148\192A\160\176\001\004\t#str@@\151\176C\160\151\176\181+SyntaxError\160\004\152@\182+SyntaxError@@\160\144\004\014@\176\192\004\151\000J\001\nJ\001\n]\192\004\152\000J\001\nJ\001\nr@@\176\192\004\154\000J\001\nJ\001\nL\192\004\155\000J\001\nJ\001\ns@\160BA\1763raiseReferenceError\144\160\160A@A\144\148\192A\160\176\001\004\005#str@@\151\176C\160\151\176\181.ReferenceError\160\004\182@\182.ReferenceError@@\160\144\004\014@\176\192\004\181\000D\001\t\159\001\t\178\192\004\182\000D\001\t\159\001\t\202@@\176\192\004\184\000D\001\t\159\001\t\161\192\004\185\000D\001\t\159\001\t\203@\160BAA", +(* Js_exn *)"\132\149\166\190\000\000\004'\000\000\000\246\000\000\003g\000\000\003@\160\b\000\000 \000\176*raiseError\144\160\160A@A\144\148\192A\160\176\001\0048#str@@\151\176C\160\151\176\181%Error\160\160AA@\182%Error@@\160\144\004\015@\176\1920others/js_exn.mlu\001\007\213\001\007\233\192\004\002u\001\007\213\001\007\246@@\176\192\004\004u\001\007\213\001\007\215\192\004\005u\001\007\213\001\b\006@\160BA\176-raiseUriError\144\160\160A@A\144\148\192A\160\176\001\004P#str@@\151\176C\160\151\176\181(URIError\160\004 @\182(URIError@@\160\144\004\014@\176\192\004\031\000Z\001\011\216\001\011\235\192\004 \000Z\001\011\216\001\011\253@@\176\192\004\"\000Z\001\011\216\001\011\218\192\004#\000Z\001\011\216\001\011\254@\160BA\176.raiseEvalError\144\160\160A@A\144\148\192A\160\176\001\004<#str@@\151\176C\160\151\176\181)EvalError\160\004>@\182)EvalError@@\160\144\004\014@\176\192\004={\001\bz\001\b\142\192\004>{\001\bz\001\b\159@@\176\192\004@{\001\bz\001\b|\192\004A{\001\bz\001\b\180@\160BA\176.raiseTypeError\144\160\160A@A\144\148\192A\160\176\001\004L#str@@\151\176C\160\151\176\181)TypeError\160\004\\@\182)TypeError@@\160\144\004\014@\176\192\004[\000T\001\011B\001\011U\192\004\\\000T\001\011B\001\011h@@\176\192\004^\000T\001\011B\001\011D\192\004_\000T\001\011B\001\011i@\160BA\176/raiseRangeError\144\160\160A@A\144\148\192A\160\176\001\004@#str@@\151\176C\160\151\176\181*RangeError\160\004z@\182*RangeError@@\160\144\004\014@\176\192\004y\000A\001\t.\001\tB\192\004z\000A\001\t.\001\tT@@\176\192\004|\000A\001\t.\001\t0\192\004}\000A\001\t.\001\tj@\160BA\1760anyToExnInternal\144\160\160A@@\144\148\192A\160\176\001\003\249!x@@\147\176\151\176\161A\1468internalToOCamlException\160\145\176@2Caml_js_exceptionsA@\176\192&_none_A@\000\255\004\002A\160\144\004\018@\176\176\192\004\156q\001\007~\001\007\130\192\004\157q\001\007~\001\007\186@BA\160BA\1760raiseSyntaxError\144\160\160A@A\144\148\192A\160\176\001\004H#str@@\151\176C\160\151\176\181+SyntaxError\160\004\184@\182+SyntaxError@@\160\144\004\014@\176\192\004\183\000N\001\n\165\001\n\184\192\004\184\000N\001\n\165\001\n\205@@\176\192\004\186\000N\001\n\165\001\n\167\192\004\187\000N\001\n\165\001\n\206@\160BA\1763raiseReferenceError\144\160\160A@A\144\148\192A\160\176\001\004D#str@@\151\176C\160\151\176\181.ReferenceError\160\004\214@\182.ReferenceError@@\160\144\004\014@\176\192\004\213\000H\001\t\250\001\n\r\192\004\214\000H\001\t\250\001\n%@@\176\192\004\216\000H\001\t\250\001\t\252\192\004\217\000H\001\t\250\001\n&@\160BAA", (* Js_int *)"\132\149\166\190\000\000\000^\000\000\000\028\000\000\000X\000\000\000U\160\144\176%equal\144\160\160B@@\144\148\192B\160\176\001\003\242!x@\160\176\001\003\243!y@@\151\176\153@\160\144\004\n\160\144\004\t@\176\1920others/js_int.ml\001\000\161\001\023\132\001\023\155\192\004\002\001\000\161\001\023\132\001\023\160@\160BAA", (* Js_obj *)"\132\149\166\190\000\000\000\003\000\000\000\001\000\000\000\003\000\000\000\003\160\128A", (* Lexing *)"\132\149\166\190\000\000\003\030\000\000\000\197\000\000\002\161\000\000\002|\160\b\000\000D\000\176&engine\144\160\160C@@@\176&lexeme\144\160\160A@@@\176(new_line\144\160\160A@@@\176*lexeme_end\144\160\160A@@\144\148\192A\160\176\001\005\012&lexbuf@@\151\176\161C\161(pos_cnum@\160\151\176\161K\161*lex_curr_pA\160\144\004\015@\176\1924stdlib-406/lexing.ml\001\000\216\001\027w\001\027\143\192\004\002\001\000\216\001\027w\001\027\160@@\176\004\004\192\004\004\001\000\216\001\027w\001\027\169@\160BA\176*new_engine\144\160\160C@@@\176*sub_lexeme\144\160\160C@@@\176+flush_input\144\160\160A@@@\176+from_string\144\160\160A@@@\176+lexeme_char\144\160\160B@@@\176,from_channel\144\160\160A@@@\176,lexeme_end_p\144\160\160A@@\144\148\192A\160\176\001\005\016&lexbuf@@\151\176\161K\161\0047A\160\144\004\b@\176\192\0046\001\000\219\001\027\218\001\027\244\192\0047\001\000\219\001\027\218\001\028\005@\160BA\176,lexeme_start\144\160\160A@@\144\148\192A\160\176\001\005\n&lexbuf@@\151\176\161C\161\004R@\160\151\176\161J\161+lex_start_pA\160\144\004\014@\176\192\004Q\001\000\215\001\027A\001\027[\192\004R\001\000\215\001\027A\001\027m@@\176\004\003\192\004T\001\000\215\001\027A\001\027v@\160BA\176-from_function\144\160\160A@@@\176.lexeme_start_p\144\160\160A@@\144\148\192A\160\176\001\005\014&lexbuf@@\151\176\161J\161\004\029A\160\144\004\b@\176\192\004m\001\000\218\001\027\171\001\027\199\192\004n\001\000\218\001\027\171\001\027\217@\160BA\176.sub_lexeme_opt\144\160\160C@@@\176/sub_lexeme_char\144\160\160B@@\144\148\192B\160\176\001\005\001&lexbuf@\160\176\001\005\002!i@@\151\176c\160\151\176\161A\161*lex_bufferA\160\144\004\015@\176\192\004\142\001\000\203\001\026?\001\026h\192\004\143\001\000\203\001\026?\001\026y@\160\144\004\017@\176\192\004\147\001\000\203\001\026?\001\026^\192\004\148\001\000\203\001\026?\001\026{@\160BA\1763sub_lexeme_char_opt\144\160\160B@@@A", diff --git a/jscomp/others/js_exn.ml b/jscomp/others/js_exn.ml index 32d4cd8bb0..07d135777a 100644 --- a/jscomp/others/js_exn.ml +++ b/jscomp/others/js_exn.ml @@ -45,11 +45,9 @@ external makeError : string -> error = "Error" [@@bs.new] external isCamlExceptionOrOpenVariant : 'a -> bool = "caml_is_extension" -let anyToExnInternal obj = - if isCamlExceptionOrOpenVariant obj then - (Obj.magic obj : exn) - else - Error ((Obj.magic obj) : t) +let anyToExnInternal x = + Caml_js_exceptions.internalToOCamlException (Obj.repr x) + let raiseError str = raise (Obj.magic (makeError str : error) : exn) diff --git a/lib/4.06.1/unstable/js_compiler.ml b/lib/4.06.1/unstable/js_compiler.ml index 2e0d8ceceb..e8418bba90 100644 --- a/lib/4.06.1/unstable/js_compiler.ml +++ b/lib/4.06.1/unstable/js_compiler.ml @@ -13,7 +13,7 @@ val module_data : end = struct #1 "builtin_cmi_datasets.ml" -(* 180a946f426a7bdebc6e18e32d9734eb *) +(* 0de2b622a7d93a9203358884b6dfb0cf *) let module_names : string array = Obj.magic ( "Js" (* 5875 *), "Arg" (* 4085 *), @@ -42,7 +42,7 @@ let module_names : string array = Obj.magic ( "Digest" (* 1335 *), "Format" (* 16006 *), "Genlex" (* 726 *), -"Js_exn" (* 1364 *), +"Js_exn" (* 1432 *), "Js_int" (* 1273 *), "Js_obj" (* 677 *), "Lexing" (* 3084 *), @@ -165,7 +165,7 @@ let module_data : string array = Obj.magic ( (* Digest *) "\132\149\166\190\000\000\005#\000\000\001 \000\000\004\006\000\000\003\215\192&Digest\160\177\176\001\004\186!t@\b\000\000,\000@@@A\144\176\179\144\176O&string@@\144@\002\005\245\225\000\000\254@@\176\192&_none_A@\000\255\004\002A@@\160@@A\160\160\176\001\004\187'compare@\192\176\193@\176\179\144\004\024@\144@\002\005\245\225\000\000\249\176\193@\176\179\004\006@\144@\002\005\245\225\000\000\250\176\179\144\176A#int@@\144@\002\005\245\225\000\000\251@\002\005\245\225\000\000\252@\002\005\245\225\000\000\253@\004\026@\160\160\176\001\004\188%equal@\192\176\193@\176\179\004\022@\144@\002\005\245\225\000\000\244\176\193@\176\179\004\027@\144@\002\005\245\225\000\000\245\176\179\144\176E$bool@@\144@\002\005\245\225\000\000\246@\002\005\245\225\000\000\247@\002\005\245\225\000\000\248@\004/@\160\160\176\001\004\189&string@\192\176\193@\176\179\144\004<@\144@\002\005\245\225\000\000\241\176\179\004/@\144@\002\005\245\225\000\000\242@\002\005\245\225\000\000\243@\004=@\160\160\176\001\004\190%bytes@\192\176\193@\176\179\144\176C%bytes@@\144@\002\005\245\225\000\000\238\176\179\004?@\144@\002\005\245\225\000\000\239@\002\005\245\225\000\000\240@\004M@\160\160\176\001\004\191)substring@\192\176\193@\176\179\144\004Z@\144@\002\005\245\225\000\000\231\176\193@\176\179\144\004F@\144@\002\005\245\225\000\000\232\176\193@\176\179\144\004L@\144@\002\005\245\225\000\000\233\176\179\004Y@\144@\002\005\245\225\000\000\234@\002\005\245\225\000\000\235@\002\005\245\225\000\000\236@\002\005\245\225\000\000\237@\004g@\160\160\176\001\004\192(subbytes@\192\176\193@\176\179\144\004*@\144@\002\005\245\225\000\000\224\176\193@\176\179\144\004`@\144@\002\005\245\225\000\000\225\176\193@\176\179\144\004f@\144@\002\005\245\225\000\000\226\176\179\004s@\144@\002\005\245\225\000\000\227@\002\005\245\225\000\000\228@\002\005\245\225\000\000\229@\002\005\245\225\000\000\230@\004\129@\160\160\176\001\004\193'channel@\192\176\193@\176\179\177\144\176@*PervasivesA*in_channel\000\255@\144@\002\005\245\225\000\000\219\176\193@\176\179\144\004~@\144@\002\005\245\225\000\000\220\176\179\004\139@\144@\002\005\245\225\000\000\221@\002\005\245\225\000\000\222@\002\005\245\225\000\000\223\144\224-caml_md5_chanBA \160@\160@@@\004\159@\160\160\176\001\004\194$file@\192\176\193@\176\179\144\004\172@\144@\002\005\245\225\000\000\216\176\179\004\159@\144@\002\005\245\225\000\000\217@\002\005\245\225\000\000\218@\004\173@\160\160\176\001\004\195&output@\192\176\193@\176\179\177\004,+out_channel\000\255@\144@\002\005\245\225\000\000\211\176\193@\176\179\004\176@\144@\002\005\245\225\000\000\212\176\179\144\176F$unit@@\144@\002\005\245\225\000\000\213@\002\005\245\225\000\000\214@\002\005\245\225\000\000\215@\004\196@\160\160\176\001\004\196%input@\192\176\193@\176\179\177\004C*in_channel\000\255@\144@\002\005\245\225\000\000\208\176\179\004\197@\144@\002\005\245\225\000\000\209@\002\005\245\225\000\000\210@\004\211@\160\160\176\001\004\197&to_hex@\192\176\193@\176\179\004\207@\144@\002\005\245\225\000\000\205\176\179\144\004\227@\144@\002\005\245\225\000\000\206@\002\005\245\225\000\000\207@\004\225@\160\160\176\001\004\198(from_hex@\192\176\193@\176\179\144\004\238@\144@\002\005\245\225\000\000\202\176\179\004\225@\144@\002\005\245\225\000\000\203@\002\005\245\225\000\000\204@\004\239@@\160\160&Digest\1440g\162\017DR\249\130\170t\240z\140\164sCu\160\160*Pervasives\1440\161\171\015\212m\226s\245\200\018\157M:VVF\160\160\"Js\14409\154\"!\241\252\216]\177\145cA\131\028\026\200\160\1608CamlinternalFormatBasics\1440\176\204G\0192\227\021\136k\159\234\t\245:us\160\160.Bs_stdlib_mini\1440<\2522V\168\021\178\216\170\252z\175\016r\000\000\012x\000\000,\156\000\000+\012\192&Format\160\177\176\001\004\146)formatter@\b\000\000,\000@@@A@@@\176\192&_none_A@\000\255\004\002A@@\160@@A\160\160\176\001\004\147+pp_open_box@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\250\176\193@\176\179\144\176A#int@@\144@\002\005\245\225\000\000\251\176\179\144\176F$unit@@\144@\002\005\245\225\000\000\252@\002\005\245\225\000\000\253@\002\005\245\225\000\000\254@\004\029@\160\160\176\001\004\148(open_box@\192\176\193@\176\179\144\004\019@\144@\002\005\245\225\000\000\247\176\179\144\004\017@\144@\002\005\245\225\000\000\248@\002\005\245\225\000\000\249@\004,@\160\160\176\001\004\149,pp_close_box@\192\176\193@\176\179\004(@\144@\002\005\245\225\000\000\242\176\193@\176\179\144\004!@\144@\002\005\245\225\000\000\243\176\179\144\004%@\144@\002\005\245\225\000\000\244@\002\005\245\225\000\000\245@\002\005\245\225\000\000\246@\004@@\160\160\176\001\004\150)close_box@\192\176\193@\176\179\144\0040@\144@\002\005\245\225\000\000\239\176\179\144\0044@\144@\002\005\245\225\000\000\240@\002\005\245\225\000\000\241@\004O@\160\160\176\001\004\151,pp_open_hbox@\192\176\193@\176\179\004K@\144@\002\005\245\225\000\000\234\176\193@\176\179\144\004D@\144@\002\005\245\225\000\000\235\176\179\144\004H@\144@\002\005\245\225\000\000\236@\002\005\245\225\000\000\237@\002\005\245\225\000\000\238@\004c@\160\160\176\001\004\152)open_hbox@\192\176\193@\176\179\144\004S@\144@\002\005\245\225\000\000\231\176\179\144\004W@\144@\002\005\245\225\000\000\232@\002\005\245\225\000\000\233@\004r@\160\160\176\001\004\153,pp_open_vbox@\192\176\193@\176\179\004n@\144@\002\005\245\225\000\000\226\176\193@\176\179\144\004m@\144@\002\005\245\225\000\000\227\176\179\144\004k@\144@\002\005\245\225\000\000\228@\002\005\245\225\000\000\229@\002\005\245\225\000\000\230@\004\134@\160\160\176\001\004\154)open_vbox@\192\176\193@\176\179\144\004|@\144@\002\005\245\225\000\000\223\176\179\144\004z@\144@\002\005\245\225\000\000\224@\002\005\245\225\000\000\225@\004\149@\160\160\176\001\004\155-pp_open_hvbox@\192\176\193@\176\179\004\145@\144@\002\005\245\225\000\000\218\176\193@\176\179\144\004\144@\144@\002\005\245\225\000\000\219\176\179\144\004\142@\144@\002\005\245\225\000\000\220@\002\005\245\225\000\000\221@\002\005\245\225\000\000\222@\004\169@\160\160\176\001\004\156*open_hvbox@\192\176\193@\176\179\144\004\159@\144@\002\005\245\225\000\000\215\176\179\144\004\157@\144@\002\005\245\225\000\000\216@\002\005\245\225\000\000\217@\004\184@\160\160\176\001\004\157.pp_open_hovbox@\192\176\193@\176\179\004\180@\144@\002\005\245\225\000\000\210\176\193@\176\179\144\004\179@\144@\002\005\245\225\000\000\211\176\179\144\004\177@\144@\002\005\245\225\000\000\212@\002\005\245\225\000\000\213@\002\005\245\225\000\000\214@\004\204@\160\160\176\001\004\158+open_hovbox@\192\176\193@\176\179\144\004\194@\144@\002\005\245\225\000\000\207\176\179\144\004\192@\144@\002\005\245\225\000\000\208@\002\005\245\225\000\000\209@\004\219@\160\160\176\001\004\159/pp_print_string@\192\176\193@\176\179\004\215@\144@\002\005\245\225\000\000\202\176\193@\176\179\144\176O&string@@\144@\002\005\245\225\000\000\203\176\179\144\004\214@\144@\002\005\245\225\000\000\204@\002\005\245\225\000\000\205@\002\005\245\225\000\000\206@\004\241@\160\160\176\001\004\160,print_string@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\199\176\179\144\004\229@\144@\002\005\245\225\000\000\200@\002\005\245\225\000\000\201@\005\001\000@\160\160\176\001\004\161+pp_print_as@\192\176\193@\176\179\004\252@\144@\002\005\245\225\000\000\192\176\193@\176\179\144\004\251@\144@\002\005\245\225\000\000\193\176\193@\176\179\144\004+@\144@\002\005\245\225\000\000\194\176\179\144\004\255@\144@\002\005\245\225\000\000\195@\002\005\245\225\000\000\196@\002\005\245\225\000\000\197@\002\005\245\225\000\000\198@\005\001\026@\160\160\176\001\004\162(print_as@\192\176\193@\176\179\144\005\001\016@\144@\002\005\245\225\000\000\187\176\193@\176\179\144\004@@\144@\002\005\245\225\000\000\188\176\179\144\005\001\020@\144@\002\005\245\225\000\000\189@\002\005\245\225\000\000\190@\002\005\245\225\000\000\191@\005\001/@\160\160\176\001\004\163,pp_print_int@\192\176\193@\176\179\005\001+@\144@\002\005\245\225\000\000\182\176\193@\176\179\144\005\001*@\144@\002\005\245\225\000\000\183\176\179\144\005\001(@\144@\002\005\245\225\000\000\184@\002\005\245\225\000\000\185@\002\005\245\225\000\000\186@\005\001C@\160\160\176\001\004\164)print_int@\192\176\193@\176\179\144\005\0019@\144@\002\005\245\225\000\000\179\176\179\144\005\0017@\144@\002\005\245\225\000\000\180@\002\005\245\225\000\000\181@\005\001R@\160\160\176\001\004\165.pp_print_float@\192\176\193@\176\179\005\001N@\144@\002\005\245\225\000\000\174\176\193@\176\179\144\176D%float@@\144@\002\005\245\225\000\000\175\176\179\144\005\001M@\144@\002\005\245\225\000\000\176@\002\005\245\225\000\000\177@\002\005\245\225\000\000\178@\005\001h@\160\160\176\001\004\166+print_float@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\171\176\179\144\005\001\\@\144@\002\005\245\225\000\000\172@\002\005\245\225\000\000\173@\005\001w@\160\160\176\001\004\167-pp_print_char@\192\176\193@\176\179\005\001s@\144@\002\005\245\225\000\000\166\176\193@\176\179\144\176B$char@@\144@\002\005\245\225\000\000\167\176\179\144\005\001r@\144@\002\005\245\225\000\000\168@\002\005\245\225\000\000\169@\002\005\245\225\000\000\170@\005\001\141@\160\160\176\001\004\168*print_char@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\163\176\179\144\005\001\129@\144@\002\005\245\225\000\000\164@\002\005\245\225\000\000\165@\005\001\156@\160\160\176\001\004\169-pp_print_bool@\192\176\193@\176\179\005\001\152@\144@\002\005\245\225\000\000\158\176\193@\176\179\144\176E$bool@@\144@\002\005\245\225\000\000\159\176\179\144\005\001\151@\144@\002\005\245\225\000\000\160@\002\005\245\225\000\000\161@\002\005\245\225\000\000\162@\005\001\178@\160\160\176\001\004\170*print_bool@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\155\176\179\144\005\001\166@\144@\002\005\245\225\000\000\156@\002\005\245\225\000\000\157@\005\001\193@\160\160\176\001\004\171.pp_print_space@\192\176\193@\176\179\005\001\189@\144@\002\005\245\225\000\000\150\176\193@\176\179\144\005\001\182@\144@\002\005\245\225\000\000\151\176\179\144\005\001\186@\144@\002\005\245\225\000\000\152@\002\005\245\225\000\000\153@\002\005\245\225\000\000\154@\005\001\213@\160\160\176\001\004\172+print_space@\192\176\193@\176\179\144\005\001\197@\144@\002\005\245\225\000\000\147\176\179\144\005\001\201@\144@\002\005\245\225\000\000\148@\002\005\245\225\000\000\149@\005\001\228@\160\160\176\001\004\173,pp_print_cut@\192\176\193@\176\179\005\001\224@\144@\002\005\245\225\000\000\142\176\193@\176\179\144\005\001\217@\144@\002\005\245\225\000\000\143\176\179\144\005\001\221@\144@\002\005\245\225\000\000\144@\002\005\245\225\000\000\145@\002\005\245\225\000\000\146@\005\001\248@\160\160\176\001\004\174)print_cut@\192\176\193@\176\179\144\005\001\232@\144@\002\005\245\225\000\000\139\176\179\144\005\001\236@\144@\002\005\245\225\000\000\140@\002\005\245\225\000\000\141@\005\002\007@\160\160\176\001\004\175.pp_print_break@\192\176\193@\176\179\005\002\003@\144@\002\005\245\225\000\000\132\176\193@\176\179\144\005\002\002@\144@\002\005\245\225\000\000\133\176\193@\176\179\144\005\002\b@\144@\002\005\245\225\000\000\134\176\179\144\005\002\006@\144@\002\005\245\225\000\000\135@\002\005\245\225\000\000\136@\002\005\245\225\000\000\137@\002\005\245\225\000\000\138@\005\002!@\160\160\176\001\004\176+print_break@\192\176\193@\176\179\144\005\002\023@\144@\002\005\245\225\000\001\255\127\176\193@\176\179\144\005\002\029@\144@\002\005\245\225\000\000\128\176\179\144\005\002\027@\144@\002\005\245\225\000\000\129@\002\005\245\225\000\000\130@\002\005\245\225\000\000\131@\005\0026@\160\160\176\001\004\1770pp_force_newline@\192\176\193@\176\179\005\0022@\144@\002\005\245\225\000\001\255z\176\193@\176\179\144\005\002+@\144@\002\005\245\225\000\001\255{\176\179\144\005\002/@\144@\002\005\245\225\000\001\255|@\002\005\245\225\000\001\255}@\002\005\245\225\000\001\255~@\005\002J@\160\160\176\001\004\178-force_newline@\192\176\193@\176\179\144\005\002:@\144@\002\005\245\225\000\001\255w\176\179\144\005\002>@\144@\002\005\245\225\000\001\255x@\002\005\245\225\000\001\255y@\005\002Y@\160\160\176\001\004\1793pp_print_if_newline@\192\176\193@\176\179\005\002U@\144@\002\005\245\225\000\001\255r\176\193@\176\179\144\005\002N@\144@\002\005\245\225\000\001\255s\176\179\144\005\002R@\144@\002\005\245\225\000\001\255t@\002\005\245\225\000\001\255u@\002\005\245\225\000\001\255v@\005\002m@\160\160\176\001\004\1800print_if_newline@\192\176\193@\176\179\144\005\002]@\144@\002\005\245\225\000\001\255o\176\179\144\005\002a@\144@\002\005\245\225\000\001\255p@\002\005\245\225\000\001\255q@\005\002|@\160\160\176\001\004\181.pp_print_flush@\192\176\193@\176\179\005\002x@\144@\002\005\245\225\000\001\255j\176\193@\176\179\144\005\002q@\144@\002\005\245\225\000\001\255k\176\179\144\005\002u@\144@\002\005\245\225\000\001\255l@\002\005\245\225\000\001\255m@\002\005\245\225\000\001\255n@\005\002\144@\160\160\176\001\004\182+print_flush@\192\176\193@\176\179\144\005\002\128@\144@\002\005\245\225\000\001\255g\176\179\144\005\002\132@\144@\002\005\245\225\000\001\255h@\002\005\245\225\000\001\255i@\005\002\159@\160\160\176\001\004\1830pp_print_newline@\192\176\193@\176\179\005\002\155@\144@\002\005\245\225\000\001\255b\176\193@\176\179\144\005\002\148@\144@\002\005\245\225\000\001\255c\176\179\144\005\002\152@\144@\002\005\245\225\000\001\255d@\002\005\245\225\000\001\255e@\002\005\245\225\000\001\255f@\005\002\179@\160\160\176\001\004\184-print_newline@\192\176\193@\176\179\144\005\002\163@\144@\002\005\245\225\000\001\255_\176\179\144\005\002\167@\144@\002\005\245\225\000\001\255`@\002\005\245\225\000\001\255a@\005\002\194@\160\160\176\001\004\185-pp_set_margin@\192\176\193@\176\179\005\002\190@\144@\002\005\245\225\000\001\255Z\176\193@\176\179\144\005\002\189@\144@\002\005\245\225\000\001\255[\176\179\144\005\002\187@\144@\002\005\245\225\000\001\255\\@\002\005\245\225\000\001\255]@\002\005\245\225\000\001\255^@\005\002\214@\160\160\176\001\004\186*set_margin@\192\176\193@\176\179\144\005\002\204@\144@\002\005\245\225\000\001\255W\176\179\144\005\002\202@\144@\002\005\245\225\000\001\255X@\002\005\245\225\000\001\255Y@\005\002\229@\160\160\176\001\004\187-pp_get_margin@\192\176\193@\176\179\005\002\225@\144@\002\005\245\225\000\001\255R\176\193@\176\179\144\005\002\218@\144@\002\005\245\225\000\001\255S\176\179\144\005\002\228@\144@\002\005\245\225\000\001\255T@\002\005\245\225\000\001\255U@\002\005\245\225\000\001\255V@\005\002\249@\160\160\176\001\004\188*get_margin@\192\176\193@\176\179\144\005\002\233@\144@\002\005\245\225\000\001\255O\176\179\144\005\002\243@\144@\002\005\245\225\000\001\255P@\002\005\245\225\000\001\255Q@\005\003\b@\160\160\176\001\004\1891pp_set_max_indent@\192\176\193@\176\179\005\003\004@\144@\002\005\245\225\000\001\255J\176\193@\176\179\144\005\003\003@\144@\002\005\245\225\000\001\255K\176\179\144\005\003\001@\144@\002\005\245\225\000\001\255L@\002\005\245\225\000\001\255M@\002\005\245\225\000\001\255N@\005\003\028@\160\160\176\001\004\190.set_max_indent@\192\176\193@\176\179\144\005\003\018@\144@\002\005\245\225\000\001\255G\176\179\144\005\003\016@\144@\002\005\245\225\000\001\255H@\002\005\245\225\000\001\255I@\005\003+@\160\160\176\001\004\1911pp_get_max_indent@\192\176\193@\176\179\005\003'@\144@\002\005\245\225\000\001\255B\176\193@\176\179\144\005\003 @\144@\002\005\245\225\000\001\255C\176\179\144\005\003*@\144@\002\005\245\225\000\001\255D@\002\005\245\225\000\001\255E@\002\005\245\225\000\001\255F@\005\003?@\160\160\176\001\004\192.get_max_indent@\192\176\193@\176\179\144\005\003/@\144@\002\005\245\225\000\001\255?\176\179\144\005\0039@\144@\002\005\245\225\000\001\255@@\002\005\245\225\000\001\255A@\005\003N@\160\160\176\001\004\1930pp_set_max_boxes@\192\176\193@\176\179\005\003J@\144@\002\005\245\225\000\001\255:\176\193@\176\179\144\005\003I@\144@\002\005\245\225\000\001\255;\176\179\144\005\003G@\144@\002\005\245\225\000\001\255<@\002\005\245\225\000\001\255=@\002\005\245\225\000\001\255>@\005\003b@\160\160\176\001\004\194-set_max_boxes@\192\176\193@\176\179\144\005\003X@\144@\002\005\245\225\000\001\2557\176\179\144\005\003V@\144@\002\005\245\225\000\001\2558@\002\005\245\225\000\001\2559@\005\003q@\160\160\176\001\004\1950pp_get_max_boxes@\192\176\193@\176\179\005\003m@\144@\002\005\245\225\000\001\2552\176\193@\176\179\144\005\003f@\144@\002\005\245\225\000\001\2553\176\179\144\005\003p@\144@\002\005\245\225\000\001\2554@\002\005\245\225\000\001\2555@\002\005\245\225\000\001\2556@\005\003\133@\160\160\176\001\004\196-get_max_boxes@\192\176\193@\176\179\144\005\003u@\144@\002\005\245\225\000\001\255/\176\179\144\005\003\127@\144@\002\005\245\225\000\001\2550@\002\005\245\225\000\001\2551@\005\003\148@\160\160\176\001\004\1971pp_over_max_boxes@\192\176\193@\176\179\005\003\144@\144@\002\005\245\225\000\001\255*\176\193@\176\179\144\005\003\137@\144@\002\005\245\225\000\001\255+\176\179\144\005\001\252@\144@\002\005\245\225\000\001\255,@\002\005\245\225\000\001\255-@\002\005\245\225\000\001\255.@\005\003\168@\160\160\176\001\004\198.over_max_boxes@\192\176\193@\176\179\144\005\003\152@\144@\002\005\245\225\000\001\255'\176\179\144\005\002\011@\144@\002\005\245\225\000\001\255(@\002\005\245\225\000\001\255)@\005\003\183@\160\160\176\001\004\199,pp_open_tbox@\192\176\193@\176\179\005\003\179@\144@\002\005\245\225\000\001\255\"\176\193@\176\179\144\005\003\172@\144@\002\005\245\225\000\001\255#\176\179\144\005\003\176@\144@\002\005\245\225\000\001\255$@\002\005\245\225\000\001\255%@\002\005\245\225\000\001\255&@\005\003\203@\160\160\176\001\004\200)open_tbox@\192\176\193@\176\179\144\005\003\187@\144@\002\005\245\225\000\001\255\031\176\179\144\005\003\191@\144@\002\005\245\225\000\001\255 @\002\005\245\225\000\001\255!@\005\003\218@\160\160\176\001\004\201-pp_close_tbox@\192\176\193@\176\179\005\003\214@\144@\002\005\245\225\000\001\255\026\176\193@\176\179\144\005\003\207@\144@\002\005\245\225\000\001\255\027\176\179\144\005\003\211@\144@\002\005\245\225\000\001\255\028@\002\005\245\225\000\001\255\029@\002\005\245\225\000\001\255\030@\005\003\238@\160\160\176\001\004\202*close_tbox@\192\176\193@\176\179\144\005\003\222@\144@\002\005\245\225\000\001\255\023\176\179\144\005\003\226@\144@\002\005\245\225\000\001\255\024@\002\005\245\225\000\001\255\025@\005\003\253@\160\160\176\001\004\203*pp_set_tab@\192\176\193@\176\179\005\003\249@\144@\002\005\245\225\000\001\255\018\176\193@\176\179\144\005\003\242@\144@\002\005\245\225\000\001\255\019\176\179\144\005\003\246@\144@\002\005\245\225\000\001\255\020@\002\005\245\225\000\001\255\021@\002\005\245\225\000\001\255\022@\005\004\017@\160\160\176\001\004\204'set_tab@\192\176\193@\176\179\144\005\004\001@\144@\002\005\245\225\000\001\255\015\176\179\144\005\004\005@\144@\002\005\245\225\000\001\255\016@\002\005\245\225\000\001\255\017@\005\004 @\160\160\176\001\004\205,pp_print_tab@\192\176\193@\176\179\005\004\028@\144@\002\005\245\225\000\001\255\n\176\193@\176\179\144\005\004\021@\144@\002\005\245\225\000\001\255\011\176\179\144\005\004\025@\144@\002\005\245\225\000\001\255\012@\002\005\245\225\000\001\255\r@\002\005\245\225\000\001\255\014@\005\0044@\160\160\176\001\004\206)print_tab@\192\176\193@\176\179\144\005\004$@\144@\002\005\245\225\000\001\255\007\176\179\144\005\004(@\144@\002\005\245\225\000\001\255\b@\002\005\245\225\000\001\255\t@\005\004C@\160\160\176\001\004\207/pp_print_tbreak@\192\176\193@\176\179\005\004?@\144@\002\005\245\225\000\001\255\000\176\193@\176\179\144\005\004>@\144@\002\005\245\225\000\001\255\001\176\193@\176\179\144\005\004D@\144@\002\005\245\225\000\001\255\002\176\179\144\005\004B@\144@\002\005\245\225\000\001\255\003@\002\005\245\225\000\001\255\004@\002\005\245\225\000\001\255\005@\002\005\245\225\000\001\255\006@\005\004]@\160\160\176\001\004\208,print_tbreak@\192\176\193@\176\179\144\005\004S@\144@\002\005\245\225\000\001\254\251\176\193@\176\179\144\005\004Y@\144@\002\005\245\225\000\001\254\252\176\179\144\005\004W@\144@\002\005\245\225\000\001\254\253@\002\005\245\225\000\001\254\254@\002\005\245\225\000\001\254\255@\005\004r@\160\160\176\001\004\2094pp_set_ellipsis_text@\192\176\193@\176\179\005\004n@\144@\002\005\245\225\000\001\254\246\176\193@\176\179\144\005\003\151@\144@\002\005\245\225\000\001\254\247\176\179\144\005\004k@\144@\002\005\245\225\000\001\254\248@\002\005\245\225\000\001\254\249@\002\005\245\225\000\001\254\250@\005\004\134@\160\160\176\001\004\2101set_ellipsis_text@\192\176\193@\176\179\144\005\003\166@\144@\002\005\245\225\000\001\254\243\176\179\144\005\004z@\144@\002\005\245\225\000\001\254\244@\002\005\245\225\000\001\254\245@\005\004\149@\160\160\176\001\004\2114pp_get_ellipsis_text@\192\176\193@\176\179\005\004\145@\144@\002\005\245\225\000\001\254\238\176\193@\176\179\144\005\004\138@\144@\002\005\245\225\000\001\254\239\176\179\144\005\003\190@\144@\002\005\245\225\000\001\254\240@\002\005\245\225\000\001\254\241@\002\005\245\225\000\001\254\242@\005\004\169@\160\160\176\001\004\2121get_ellipsis_text@\192\176\193@\176\179\144\005\004\153@\144@\002\005\245\225\000\001\254\235\176\179\144\005\003\205@\144@\002\005\245\225\000\001\254\236@\002\005\245\225\000\001\254\237@\005\004\184@\160\177\176\001\004\213#tag@\b\000\000,\000@@@A\144\176\179\144\005\003\215@\144@\002\005\245\225\000\001\254\234@@\005\004\194@@\005\004\191A\160\160\176\001\004\214+pp_open_tag@\192\176\193@\176\179\005\004\190@\144@\002\005\245\225\000\001\254\229\176\193@\176\179\144\005\003\231@\144@\002\005\245\225\000\001\254\230\176\179\144\005\004\187@\144@\002\005\245\225\000\001\254\231@\002\005\245\225\000\001\254\232@\002\005\245\225\000\001\254\233@\005\004\214@\160\160\176\001\004\215(open_tag@\192\176\193@\176\179\144\004&@\144@\002\005\245\225\000\001\254\226\176\179\144\005\004\202@\144@\002\005\245\225\000\001\254\227@\002\005\245\225\000\001\254\228@\005\004\229@\160\160\176\001\004\216,pp_close_tag@\192\176\193@\176\179\005\004\225@\144@\002\005\245\225\000\001\254\221\176\193@\176\179\144\005\004\218@\144@\002\005\245\225\000\001\254\222\176\179\144\005\004\222@\144@\002\005\245\225\000\001\254\223@\002\005\245\225\000\001\254\224@\002\005\245\225\000\001\254\225@\005\004\249@\160\160\176\001\004\217)close_tag@\192\176\193@\176\179\144\005\004\233@\144@\002\005\245\225\000\001\254\218\176\179\144\005\004\237@\144@\002\005\245\225\000\001\254\219@\002\005\245\225\000\001\254\220@\005\005\b@\160\160\176\001\004\218+pp_set_tags@\192\176\193@\176\179\005\005\004@\144@\002\005\245\225\000\001\254\213\176\193@\176\179\144\005\003l@\144@\002\005\245\225\000\001\254\214\176\179\144\005\005\001@\144@\002\005\245\225\000\001\254\215@\002\005\245\225\000\001\254\216@\002\005\245\225\000\001\254\217@\005\005\028@\160\160\176\001\004\219(set_tags@\192\176\193@\176\179\144\005\003{@\144@\002\005\245\225\000\001\254\210\176\179\144\005\005\016@\144@\002\005\245\225\000\001\254\211@\002\005\245\225\000\001\254\212@\005\005+@\160\160\176\001\004\2201pp_set_print_tags@\192\176\193@\176\179\005\005'@\144@\002\005\245\225\000\001\254\205\176\193@\176\179\144\005\003\143@\144@\002\005\245\225\000\001\254\206\176\179\144\005\005$@\144@\002\005\245\225\000\001\254\207@\002\005\245\225\000\001\254\208@\002\005\245\225\000\001\254\209@\005\005?@\160\160\176\001\004\221.set_print_tags@\192\176\193@\176\179\144\005\003\158@\144@\002\005\245\225\000\001\254\202\176\179\144\005\0053@\144@\002\005\245\225\000\001\254\203@\002\005\245\225\000\001\254\204@\005\005N@\160\160\176\001\004\2220pp_set_mark_tags@\192\176\193@\176\179\005\005J@\144@\002\005\245\225\000\001\254\197\176\193@\176\179\144\005\003\178@\144@\002\005\245\225\000\001\254\198\176\179\144\005\005G@\144@\002\005\245\225\000\001\254\199@\002\005\245\225\000\001\254\200@\002\005\245\225\000\001\254\201@\005\005b@\160\160\176\001\004\223-set_mark_tags@\192\176\193@\176\179\144\005\003\193@\144@\002\005\245\225\000\001\254\194\176\179\144\005\005V@\144@\002\005\245\225\000\001\254\195@\002\005\245\225\000\001\254\196@\005\005q@\160\160\176\001\004\2241pp_get_print_tags@\192\176\193@\176\179\005\005m@\144@\002\005\245\225\000\001\254\189\176\193@\176\179\144\005\005f@\144@\002\005\245\225\000\001\254\190\176\179\144\005\003\217@\144@\002\005\245\225\000\001\254\191@\002\005\245\225\000\001\254\192@\002\005\245\225\000\001\254\193@\005\005\133@\160\160\176\001\004\225.get_print_tags@\192\176\193@\176\179\144\005\005u@\144@\002\005\245\225\000\001\254\186\176\179\144\005\003\232@\144@\002\005\245\225\000\001\254\187@\002\005\245\225\000\001\254\188@\005\005\148@\160\160\176\001\004\2260pp_get_mark_tags@\192\176\193@\176\179\005\005\144@\144@\002\005\245\225\000\001\254\181\176\193@\176\179\144\005\005\137@\144@\002\005\245\225\000\001\254\182\176\179\144\005\003\252@\144@\002\005\245\225\000\001\254\183@\002\005\245\225\000\001\254\184@\002\005\245\225\000\001\254\185@\005\005\168@\160\160\176\001\004\227-get_mark_tags@\192\176\193@\176\179\144\005\005\152@\144@\002\005\245\225\000\001\254\178\176\179\144\005\004\011@\144@\002\005\245\225\000\001\254\179@\002\005\245\225\000\001\254\180@\005\005\183@\160\160\176\001\004\228set_formatter_output_functions@\192\176\193@\176\193@\176\179\144\005\0056@\144@\002\005\245\225\000\001\254\142\176\193@\176\179\144\005\006\018@\144@\002\005\245\225\000\001\254\143\176\193@\176\179\144\005\006\024@\144@\002\005\245\225\000\001\254\144\176\179\144\005\006\022@\144@\002\005\245\225\000\001\254\145@\002\005\245\225\000\001\254\146@\002\005\245\225\000\001\254\147@\002\005\245\225\000\001\254\148\176\193@\176\193@\176\179\144\005\006\030@\144@\002\005\245\225\000\001\254\149\176\179\144\005\006\"@\144@\002\005\245\225\000\001\254\150@\002\005\245\225\000\001\254\151\176\179\144\005\006&@\144@\002\005\245\225\000\001\254\152@\002\005\245\225\000\001\254\153@\002\005\245\225\000\001\254\154@\005\006A@\160\160\176\001\004\232\t!pp_get_formatter_output_functions@\192\176\193@\176\179\005\006=@\144@\002\005\245\225\000\001\254\127\176\193@\176\179\144\005\0066@\144@\002\005\245\225\000\001\254\128\176\146\160\176\193@\176\179\144\005\005o@\144@\002\005\245\225\000\001\254\132\176\193@\176\179\144\005\006K@\144@\002\005\245\225\000\001\254\133\176\193@\176\179\144\005\006Q@\144@\002\005\245\225\000\001\254\134\176\179\144\005\006O@\144@\002\005\245\225\000\001\254\135@\002\005\245\225\000\001\254\136@\002\005\245\225\000\001\254\137@\002\005\245\225\000\001\254\138\160\176\193@\176\179\144\005\006V@\144@\002\005\245\225\000\001\254\129\176\179\144\005\006Z@\144@\002\005\245\225\000\001\254\130@\002\005\245\225\000\001\254\131@\002\005\245\225\000\001\254\139@\002\005\245\225\000\001\254\140@\002\005\245\225\000\001\254\141@\005\006u@\160\160\176\001\004\233>get_formatter_output_functions@\192\176\193@\176\179\144\005\006e@\144@\002\005\245\225\000\001\254r\176\146\160\176\193@\176\179\144\005\005\158@\144@\002\005\245\225\000\001\254v\176\193@\176\179\144\005\006z@\144@\002\005\245\225\000\001\254w\176\193@\176\179\144\005\006\128@\144@\002\005\245\225\000\001\254x\176\179\144\005\006~@\144@\002\005\245\225\000\001\254y@\002\005\245\225\000\001\254z@\002\005\245\225\000\001\254{@\002\005\245\225\000\001\254|\160\176\193@\176\179\144\005\006\133@\144@\002\005\245\225\000\001\254s\176\179\144\005\006\137@\144@\002\005\245\225\000\001\254t@\002\005\245\225\000\001\254u@\002\005\245\225\000\001\254}@\002\005\245\225\000\001\254~@\005\006\164@\160\177\176\001\004\2347formatter_out_functions@\b\000\000,\000@@\160\160\208\176\001\004C*out_string@@\176\193@\176\179\144\005\005\201@\144@\002\005\245\225\000\001\254k\176\193@\176\179\144\005\006\165@\144@\002\005\245\225\000\001\254l\176\193@\176\179\144\005\006\171@\144@\002\005\245\225\000\001\254m\176\179\144\005\006\169@\144@\002\005\245\225\000\001\254n@\002\005\245\225\000\001\254o@\002\005\245\225\000\001\254p@\002\005\245\225\000\001\254q\005\006\196@\160\208\176\001\004D)out_flush@@\176\193@\176\179\144\005\006\179@\144@\002\005\245\225\000\001\254h\176\179\144\005\006\183@\144@\002\005\245\225\000\001\254i@\002\005\245\225\000\001\254j\005\006\210@\160\208\176\001\004E+out_newline@@\176\193@\176\179\144\005\006\193@\144@\002\005\245\225\000\001\254e\176\179\144\005\006\197@\144@\002\005\245\225\000\001\254f@\002\005\245\225\000\001\254g\005\006\224@\160\208\176\001\004F*out_spaces@@\176\193@\176\179\144\005\006\213@\144@\002\005\245\225\000\001\254b\176\179\144\005\006\211@\144@\002\005\245\225\000\001\254c@\002\005\245\225\000\001\254d\005\006\238@\160\208\176\001\004G*out_indent@@\176\193@\176\179\144\005\006\227@\144@\002\005\245\225\000\001\254_\176\179\144\005\006\225@\144@\002\005\245\225\000\001\254`@\002\005\245\225\000\001\254a\005\006\252@@@A@@@\005\006\252@@\005\006\249A\160\160\176\001\004\235>pp_set_formatter_out_functions@\192\176\193@\176\179\005\006\248@\144@\002\005\245\225\000\001\254Z\176\193@\176\179\144\004e@\144@\002\005\245\225\000\001\254[\176\179\144\005\006\245@\144@\002\005\245\225\000\001\254\\@\002\005\245\225\000\001\254]@\002\005\245\225\000\001\254^@\005\007\016@\160\160\176\001\004\236;set_formatter_out_functions@\192\176\193@\176\179\004\015@\144@\002\005\245\225\000\001\254W\176\179\144\005\007\003@\144@\002\005\245\225\000\001\254X@\002\005\245\225\000\001\254Y@\005\007\030@\160\160\176\001\004\237>pp_get_formatter_out_functions@\192\176\193@\176\179\005\007\026@\144@\002\005\245\225\000\001\254R\176\193@\176\179\144\005\007\019@\144@\002\005\245\225\000\001\254S\176\179\004&@\144@\002\005\245\225\000\001\254T@\002\005\245\225\000\001\254U@\002\005\245\225\000\001\254V@\005\0071@\160\160\176\001\004\238;get_formatter_out_functions@\192\176\193@\176\179\144\005\007!@\144@\002\005\245\225\000\001\254O\176\179\0044@\144@\002\005\245\225\000\001\254P@\002\005\245\225\000\001\254Q@\005\007?@\160\177\176\001\004\2397formatter_tag_functions@\b\000\000,\000@@\160\160\208\176\001\004M-mark_open_tag@@\176\193@\176\179\005\002n@\144@\002\005\245\225\000\001\254L\176\179\144\005\006g@\144@\002\005\245\225\000\001\254M@\002\005\245\225\000\001\254N\005\007R@\160\208\176\001\004N.mark_close_tag@@\176\193@\176\179\005\002{@\144@\002\005\245\225\000\001\254I\176\179\144\005\006t@\144@\002\005\245\225\000\001\254J@\002\005\245\225\000\001\254K\005\007_@\160\208\176\001\004O.print_open_tag@@\176\193@\176\179\005\002\136@\144@\002\005\245\225\000\001\254F\176\179\144\005\007Q@\144@\002\005\245\225\000\001\254G@\002\005\245\225\000\001\254H\005\007l@\160\208\176\001\004P/print_close_tag@@\176\193@\176\179\005\002\149@\144@\002\005\245\225\000\001\254C\176\179\144\005\007^@\144@\002\005\245\225\000\001\254D@\002\005\245\225\000\001\254E\005\007y@@@A@@@\005\007y@@\005\007vA\160\160\176\001\004\240>pp_set_formatter_tag_functions@\192\176\193@\176\179\005\007u@\144@\002\005\245\225\000\001\254>\176\193@\176\179\144\004G@\144@\002\005\245\225\000\001\254?\176\179\144\005\007r@\144@\002\005\245\225\000\001\254@@\002\005\245\225\000\001\254A@\002\005\245\225\000\001\254B@\005\007\141@\160\160\176\001\004\241;set_formatter_tag_functions@\192\176\193@\176\179\004\015@\144@\002\005\245\225\000\001\254;\176\179\144\005\007\128@\144@\002\005\245\225\000\001\254<@\002\005\245\225\000\001\254=@\005\007\155@\160\160\176\001\004\242>pp_get_formatter_tag_functions@\192\176\193@\176\179\005\007\151@\144@\002\005\245\225\000\001\2546\176\193@\176\179\144\005\007\144@\144@\002\005\245\225\000\001\2547\176\179\004&@\144@\002\005\245\225\000\001\2548@\002\005\245\225\000\001\2549@\002\005\245\225\000\001\254:@\005\007\174@\160\160\176\001\004\243;get_formatter_tag_functions@\192\176\193@\176\179\144\005\007\158@\144@\002\005\245\225\000\001\2543\176\179\0044@\144@\002\005\245\225\000\001\2544@\002\005\245\225\000\001\2545@\005\007\188@\160\160\176\001\004\2448formatter_of_out_channel@\192\176\193@\176\179\177\144\176@*PervasivesA+out_channel\000\255@\144@\002\005\245\225\000\001\2540\176\179\005\007\192@\144@\002\005\245\225\000\001\2541@\002\005\245\225\000\001\2542@\005\007\206@\160\160\176\001\004\245-std_formatter@\192\176\179\005\007\200@\144@\002\005\245\225\000\001\254/@\005\007\214@\160\160\176\001\004\246-err_formatter@\192\176\179\005\007\208@\144@\002\005\245\225\000\001\254.@\005\007\222@\160\160\176\001\004\2473formatter_of_buffer@\192\176\193@\176\179\177\144\176@&BufferA!t\000\255@\144@\002\005\245\225\000\001\254+\176\179\005\007\226@\144@\002\005\245\225\000\001\254,@\002\005\245\225\000\001\254-@\005\007\240@\160\160\176\001\004\248&stdbuf@\192\176\179\177\144\176@&BufferA!t\000\255@\144@\002\005\245\225\000\001\254*@\005\007\253@\160\160\176\001\004\249-str_formatter@\192\176\179\005\007\247@\144@\002\005\245\225\000\001\254)@\005\b\005@\160\160\176\001\004\2503flush_str_formatter@\192\176\193@\176\179\144\005\007\245@\144@\002\005\245\225\000\001\254&\176\179\144\005\007)@\144@\002\005\245\225\000\001\254'@\002\005\245\225\000\001\254(@\005\b\020@\160\160\176\001\004\251.make_formatter@\192\176\193@\176\193@\176\179\144\005\0076@\144@\002\005\245\225\000\001\254\025\176\193@\176\179\144\005\b\018@\144@\002\005\245\225\000\001\254\026\176\193@\176\179\144\005\b\024@\144@\002\005\245\225\000\001\254\027\176\179\144\005\b\022@\144@\002\005\245\225\000\001\254\028@\002\005\245\225\000\001\254\029@\002\005\245\225\000\001\254\030@\002\005\245\225\000\001\254\031\176\193@\176\193@\176\179\144\005\b\030@\144@\002\005\245\225\000\001\254 \176\179\144\005\b\"@\144@\002\005\245\225\000\001\254!@\002\005\245\225\000\001\254\"\176\179\005\b2@\144@\002\005\245\225\000\001\254#@\002\005\245\225\000\001\254$@\002\005\245\225\000\001\254%@\005\b@@\160\160\176\001\004\252:formatter_of_out_functions@\192\176\193@\176\179\005\001?@\144@\002\005\245\225\000\001\254\022\176\179\005\b?@\144@\002\005\245\225\000\001\254\023@\002\005\245\225\000\001\254\024@\005\bM@\160\177\176\001\004\2534symbolic_output_item@\b\000\000,\000@@\145\160\208\176\001\004_,Output_flush@\144@@\005\bX@\160\208\176\001\004`.Output_newline@\144@@\005\b]@\160\208\176\001\004a-Output_string@\144\160\176\179\144\005\007|@\144@\002\005\245\225\000\001\254\021@@\005\bg@\160\208\176\001\004b-Output_spaces@\144\160\176\179\144\005\b\\@\144@\002\005\245\225\000\001\254\020@@\005\bq@\160\208\176\001\004c-Output_indent@\144\160\176\179\144\005\bf@\144@\002\005\245\225\000\001\254\019@@\005\b{@@A@@@\005\b{@@\005\bxA\160\177\176\001\004\2546symbolic_output_buffer@\b\000\000,\000@@@A@@@\005\b\128@@\005\b}A\160\160\176\001\004\255;make_symbolic_output_buffer@\192\176\193@\176\179\144\005\bp@\144@\002\005\245\225\000\001\254\016\176\179\144\004\017@\144@\002\005\245\225\000\001\254\017@\002\005\245\225\000\001\254\018@\005\b\143@\160\160\176\001\005\000\160\176\193@\176\179\144\005\012\031@\144@\002\005\245\225\000\001\2539\176\179\144\005\012\029@\144@\002\005\245\225\000\001\253:@\002\005\245\225\000\001\253;@\002\005\245\225\000\001\253I@\002\005\245\225\000\001\253J@\002\005\245\225\000\001\253K@\005\0128\160\160\1600ocaml.deprecated\005\012<\144\160\160\160\176\145\162\t2Use Format.pp_get_formatter_out_functions instead.@\005\012D@@\005\012D@@@\160\160&Format\1440\206\172wan\183\020\0175:\154\1597\144\241w\160\160%Uchar\1440\172\0161\143? {|[Symbol.for("name")]|} end -module Js_fold +module Js_iter = struct -#1 "js_fold.ml" +#1 "js_iter.ml" open J - class virtual fold = - object ((o : 'self_type)) - method unknown : 'a. 'a -> 'self_type = fun _ -> o - method string : string -> 'self_type = fun _ -> o + let unknown _self _ = () + class iter = + object ((_self : 'self_type)) method option : - 'a. ('self_type -> 'a -> 'self_type) -> 'a option -> 'self_type = - fun _f_a -> function | None -> o | Some _x -> let o = _f_a o _x in o + 'a. ('self_type -> 'a -> unit) -> 'a option -> unit = + fun _f_a -> function | None -> () | Some _x -> _f_a _self _x method list : - 'a. ('self_type -> 'a -> 'self_type) -> 'a list -> 'self_type = + 'a. ('self_type -> 'a -> unit) -> 'a list -> unit = fun _f_a -> function - | [] -> o - | _x :: _x_i1 -> let o = _f_a o _x in let o = o#list _f_a _x_i1 in o - method int32 : int32 -> 'self_type = fun _ -> o - method int : int -> 'self_type = fun _ -> o - method bool : bool -> 'self_type = fun _ -> o - method label : label -> 'self_type = o#string -method binop : binop -> 'self_type = o#unknown -method int_op : int_op -> 'self_type = o#unknown -method kind : kind -> 'self_type = o#unknown -method property : property -> 'self_type = o#unknown -method number : number -> 'self_type = o#unknown -method mutable_flag : mutable_flag -> 'self_type = o#unknown -method ident_info : ident_info -> 'self_type = o#unknown -method exports : exports -> 'self_type = o#unknown -method tag_info : tag_info -> 'self_type = o#unknown -method required_modules : required_modules -> 'self_type = o#list (fun o -> o#module_id) -method property_name : property_name -> 'self_type = o#unknown -method ident : ident -> 'self_type = o#unknown -method module_id : module_id -> 'self_type = fun { id = _x0;kind = _x1} -> let o = o#ident _x0 in -let o = o#unknown _x1 in o -method vident : vident -> 'self_type = function + | [] -> () + | _x :: _x_i1 -> _f_a _self _x ; _self#list _f_a _x_i1 + method label : label -> unit = unknown _self +method required_modules : required_modules -> unit = _self#list (fun _self -> _self#module_id) +method ident : ident -> unit = unknown _self +method module_id : module_id -> unit = fun { id = _x0;kind = _x1} -> begin _self#ident _x0 end +method vident : vident -> unit = function | Id ( _x0) -> -let o = o#ident _x0 in - o + begin _self#ident _x0 end |Qualified ( _x0,_x1) -> -let o = o#module_id _x0 in -let o = o#option (fun o -> o#string) _x1 in - o -method exception_ident : exception_ident -> 'self_type = o#ident -method for_ident : for_ident -> 'self_type = o#ident -method for_direction : for_direction -> 'self_type = o#unknown -method property_map : property_map -> 'self_type = o#list (fun o -> fun ( _x0,_x1) -> let o = o#property_name _x0 in let o = o#expression _x1 in o) -method length_object : length_object -> 'self_type = o#unknown -method expression_desc : expression_desc -> 'self_type = function + begin _self#module_id _x0;_self#option (fun _self -> unknown _self) _x1 end +method exception_ident : exception_ident -> unit = _self#ident +method for_ident : for_ident -> unit = _self#ident +method for_direction : for_direction -> unit = unknown _self +method property_map : property_map -> unit = _self#list (fun _self -> fun ( _x0,_x1) -> begin _self#expression _x1 end) +method length_object : length_object -> unit = unknown _self +method expression_desc : expression_desc -> unit = function | Length ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#length_object _x1 in - o + begin _self#expression _x0;_self#length_object _x1 end |Char_of_int ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Char_to_int ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Is_null_or_undefined ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |String_append ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o -|Bool ( _x0) -> -let o = o#bool _x0 in - o + begin _self#expression _x0;_self#expression _x1 end +|Bool _ -> () |Typeof ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Js_not ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Seq ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Cond ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#expression _x1 in -let o = o#expression _x2 in - o + begin _self#expression _x0;_self#expression _x1;_self#expression _x2 end |Bin ( _x0,_x1,_x2) -> -let o = o#binop _x0 in -let o = o#expression _x1 in -let o = o#expression _x2 in - o + begin _self#expression _x1;_self#expression _x2 end |FlatCall ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Call ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#expression) _x1 in -let o = o#unknown _x2 in - o + begin _self#expression _x0;_self#list (fun _self -> _self#expression) _x1 end |String_index ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Array_index ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Static_index ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#string _x1 in -let o = o#option (fun o -> o#int32) _x2 in - o + begin _self#expression _x0;_self#option (fun _self -> unknown _self) _x2 end |New ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#option (fun o -> o#list (fun o -> o#expression)) _x1 in - o + begin _self#expression _x0;_self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 end |Var ( _x0) -> -let o = o#vident _x0 in - o + begin _self#vident _x0 end |Fun ( _x0,_x1,_x2,_x3) -> -let o = o#bool _x0 in -let o = o#list (fun o -> o#ident) _x1 in -let o = o#block _x2 in -let o = o#unknown _x3 in - o -|Str ( _x0,_x1) -> -let o = o#bool _x0 in -let o = o#string _x1 in - o -|Unicode ( _x0) -> -let o = o#string _x0 in - o -|Raw_js_code ( _x0) -> -let o = o#unknown _x0 in - o + begin _self#list (fun _self -> _self#ident) _x1;_self#block _x2 end +|Str _ -> () +|Unicode _ -> () +|Raw_js_code _ -> () |Array ( _x0,_x1) -> -let o = o#list (fun o -> o#expression) _x0 in -let o = o#mutable_flag _x1 in - o + begin _self#list (fun _self -> _self#expression) _x0 end |Optional_block ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#bool _x1 in - o + begin _self#expression _x0 end |Caml_block ( _x0,_x1,_x2,_x3) -> -let o = o#list (fun o -> o#expression) _x0 in -let o = o#mutable_flag _x1 in -let o = o#expression _x2 in -let o = o#tag_info _x3 in - o + begin _self#list (fun _self -> _self#expression) _x0;_self#expression _x2 end |Caml_block_tag ( _x0) -> -let o = o#expression _x0 in - o -|Number ( _x0) -> -let o = o#number _x0 in - o + begin _self#expression _x0 end +|Number _ -> () |Object ( _x0) -> -let o = o#property_map _x0 in - o -|Undefined -> o -|Null -> o -method for_ident_expression : for_ident_expression -> 'self_type = o#expression -method finish_ident_expression : finish_ident_expression -> 'self_type = o#expression -method statement_desc : statement_desc -> 'self_type = function + begin _self#property_map _x0 end +|Undefined -> () +|Null -> () +method for_ident_expression : for_ident_expression -> unit = _self#expression +method finish_ident_expression : finish_ident_expression -> unit = _self#expression +method statement_desc : statement_desc -> unit = function | Block ( _x0) -> -let o = o#block _x0 in - o + begin _self#block _x0 end |Variable ( _x0) -> -let o = o#variable_declaration _x0 in - o + begin _self#variable_declaration _x0 end |Exp ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |If ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#block _x1 in -let o = o#block _x2 in - o + begin _self#expression _x0;_self#block _x1;_self#block _x2 end |While ( _x0,_x1,_x2,_x3) -> -let o = o#option (fun o -> o#label) _x0 in -let o = o#expression _x1 in -let o = o#block _x2 in -let o = o#unknown _x3 in - o + begin _self#option (fun _self -> _self#label) _x0;_self#expression _x1;_self#block _x2 end |ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> -let o = o#option (fun o -> o#for_ident_expression) _x0 in -let o = o#finish_ident_expression _x1 in -let o = o#for_ident _x2 in -let o = o#for_direction _x3 in -let o = o#block _x4 in -let o = o#unknown _x5 in - o + begin _self#option (fun _self -> _self#for_ident_expression) _x0;_self#finish_ident_expression _x1;_self#for_ident _x2;_self#for_direction _x3;_self#block _x4 end |Continue ( _x0) -> -let o = o#label _x0 in - o -|Break -> o + begin _self#label _x0 end +|Break -> () |Return ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Int_switch ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#int_clause) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o + begin _self#expression _x0;_self#list (fun _self -> _self#int_clause) _x1;_self#option (fun _self -> _self#block) _x2 end |String_switch ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#string_clause) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o + begin _self#expression _x0;_self#list (fun _self -> _self#string_clause) _x1;_self#option (fun _self -> _self#block) _x2 end |Throw ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Try ( _x0,_x1,_x2) -> -let o = o#block _x0 in -let o = o#option (fun o -> fun ( _x0,_x1) -> let o = o#exception_ident _x0 in let o = o#block _x1 in o) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o -|Debugger -> o -method expression : expression -> 'self_type = fun { expression_desc = _x0;comment = _x1} -> let o = o#expression_desc _x0 in -let o = o#option (fun o -> o#string) _x1 in o -method statement : statement -> 'self_type = fun { statement_desc = _x0;comment = _x1} -> let o = o#statement_desc _x0 in -let o = o#option (fun o -> o#string) _x1 in o -method variable_declaration : variable_declaration -> 'self_type = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let o = o#ident _x0 in -let o = o#option (fun o -> o#expression) _x1 in -let o = o#property _x2 in -let o = o#ident_info _x3 in o -method string_clause : string_clause -> 'self_type = fun ( _x0,_x1) -> let o = o#string _x0 in let o = o#case_clause _x1 in o -method int_clause : int_clause -> 'self_type = fun ( _x0,_x1) -> let o = o#int _x0 in let o = o#case_clause _x1 in o -method case_clause : case_clause -> 'self_type = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let o = o#block _x0 in -let o = o#bool _x1 in -let o = o#option (fun o -> o#string) _x2 in o -method block : block -> 'self_type = o#list (fun o -> o#statement) -method program : program -> 'self_type = fun { block = _x0;exports = _x1;export_set = _x2} -> let o = o#block _x0 in -let o = o#exports _x1 in -let o = o#unknown _x2 in o -method deps_program : deps_program -> 'self_type = fun { program = _x0;modules = _x1;side_effect = _x2} -> let o = o#program _x0 in -let o = o#required_modules _x1 in -let o = o#option (fun o -> o#string) _x2 in o + begin _self#block _x0;_self#option (fun _self -> fun ( _x0,_x1) -> begin _self#exception_ident _x0;_self#block _x1 end) _x1;_self#option (fun _self -> _self#block) _x2 end +|Debugger -> () +method expression : expression -> unit = fun { expression_desc = _x0;comment = _x1} -> begin _self#expression_desc _x0;_self#option (fun _self -> unknown _self) _x1 end +method statement : statement -> unit = fun { statement_desc = _x0;comment = _x1} -> begin _self#statement_desc _x0;_self#option (fun _self -> unknown _self) _x1 end +method variable_declaration : variable_declaration -> unit = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> begin _self#ident _x0;_self#option (fun _self -> _self#expression) _x1 end +method string_clause : string_clause -> unit = fun ( _x0,_x1) -> begin _self#case_clause _x1 end +method int_clause : int_clause -> unit = fun ( _x0,_x1) -> begin _self#case_clause _x1 end +method case_clause : case_clause -> unit = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> begin _self#block _x0;_self#option (fun _self -> unknown _self) _x2 end +method block : block -> unit = _self#list (fun _self -> _self#statement) +method program : program -> unit = fun { block = _x0;exports = _x1;export_set = _x2} -> begin _self#block _x0 end +method deps_program : deps_program -> unit = fun { program = _x0;modules = _x1;side_effect = _x2} -> begin _self#program _x0;_self#required_modules _x1;_self#option (fun _self -> unknown _self) _x2 end end end @@ -87083,23 +86969,22 @@ let add_defined_idents (x : idents_stats) ident = Note such shaking is done in the toplevel, so that it requires us to flatten the statement first *) -let free_variables (stats : idents_stats) : Js_fold.fold = +let free_variables (stats : idents_stats) : Js_iter.iter = object (self) - inherit Js_fold.fold as super + inherit Js_iter.iter as super method! variable_declaration st = add_defined_idents stats st.ident; match st.value with | None - -> self + -> () | Some v -> self # expression v method! ident id = (if not (Set_ident.mem stats.defined_idents id )then - stats.used_idents <- Set_ident.add stats.used_idents id); - self - method! expression exp = + stats.used_idents <- Set_ident.add stats.used_idents id) + method! expression exp = match exp.expression_desc with | Fun(_, _,_, env) (** a optimization to avoid walking into funciton again @@ -87107,8 +86992,8 @@ let free_variables (stats : idents_stats) : Js_fold.fold = *) -> stats.used_idents <- - Set_ident.union (Js_fun_env.get_unbounded env) stats.used_idents; - self + Set_ident.union (Js_fun_env.get_unbounded env) stats.used_idents + | _ -> @@ -87179,32 +87064,31 @@ and no_side_effect (x : J.expression) = let no_side_effect_expression (x : J.expression) = no_side_effect x -let no_side_effect clean : Js_fold.fold = +let no_side_effect clean : Js_iter.iter = object (self) - inherit Js_fold.fold as super + inherit Js_iter.iter as super method! statement s = - if not !clean then self else + if !clean then match s.statement_desc with | Throw _ | Debugger | Break | Variable _ | Continue _ -> - clean := false ; self + clean := false | Exp e -> self#expression e | Int_switch _ | String_switch _ | ForRange _ | If _ | While _ | Block _ | Return _ | Try _ -> super#statement s method! list f x = - if not !clean then self else super#list f x + if !clean then super#list f x method! expression s = - (if !clean then - clean := no_side_effect_expression s); - self - (** only expression would cause side effec *) + if !clean then + clean := no_side_effect_expression s + (** only expression would cause side effec *) end let no_side_effect_statement st = let clean = ref true in - let _ : Js_fold.fold = ((no_side_effect clean)#statement st) in + (no_side_effect clean)#statement st; !clean (* TODO: generate [fold2] @@ -97364,7 +97248,7 @@ val module_data : end = struct #1 "builtin_cmj_datasets.ml" -(* 9097ac58a880bd250b75abc9bbe3ab23 *) +(* 95bdc35141d59aa599978fe46d5f8ea8 *) let module_names : string array = Obj.magic ( "Js" (* 23 *), "Arg" (* 289 *), @@ -97393,7 +97277,7 @@ let module_names : string array = Obj.magic ( "Digest" (* 428 *), "Format" (* 4181 *), "Genlex" (* 44 *), -"Js_exn" (* 932 *), +"Js_exn" (* 1083 *), "Js_int" (* 114 *), "Js_obj" (* 23 *), "Lexing" (* 818 *), @@ -97525,7 +97409,7 @@ let module_data : string array = Obj.magic ( (* Digest *)"\132\149\166\190\000\000\001\152\000\000\000t\000\000\001}\000\000\001f\160\b\000\000,\000\176$file\144\160\160A@@@\176%bytes\144\160\160A@@@\176%equal\144\160\160B@@@\176%input\144\160\160A@@\144\148\192A\160\176\001\004\199$chan@@\147\176\151\176\161\000C\1463really_input_string\160\145\176@*PervasivesA@\176\192&_none_A@\000\255\004\002A\160\144\004\018\160\146\160\018_i\000\000\000\000\016@@\176\176\1924stdlib-406/digest.mlo\001\007=\001\007N\192\004\002o\001\007=\001\007i@BA\160BA\176&output\144\160\160B@@\144\148\192B\160\176\001\004\196$chan@\160\176\001\004\197&digest@@\147\176\151\176\161o\146-output_string\160\145\004(@\004&\160\144\004\016\160\144\004\015@\176\176\192\004!m\001\007 \001\007\"\192\004\"m\001\007 \001\007;@BA\160BA\176&string\144\160\160A@@@\176&to_hex\144\160\160A@@@\176'compare\144\160\160B@@@\176(from_hex\144\160\160A@@@\176(subbytes\144\160\160C@@@\176)substring\144\160\160C@@@A", (* Format *)"\132\149\166\190\000\000\016A\000\000\003y\000\000\012~\000\000\011`\160\b\000\001\252\000\176&printf\144\160\160A@@@\176&stdbuf\144\160@@@\176'bprintf\144\160\160B@@@\176'eprintf\144\160\160A@@@\176'fprintf\144\160\160B@@@\176'kprintf\144\160\160B@@@\176'set_tab\144\160\160A@@@\176'sprintf\144\160\160A@@@\176(asprintf\144\160\160A@@@\176(ifprintf\144\160\160B\160A@@@\176(kfprintf\144\160\160C@@@\176(ksprintf\144\004\031@\176(open_box\144\160\160A@@@\176(open_tag\144\160\160A@@@\176(print_as\144\160\160B@@@\176(set_tags\144\160\160A@@@\176)close_box\144\160\160A@@@\176)close_tag\144\160\160A@@@\176)ikfprintf\144\160\160C\004,@@\176)kasprintf\144\160\160B@@@\176)open_hbox\144\160\160A@@@\176)open_tbox\144\160\160A@@@\176)open_vbox\144\160\160A@@@\176)print_cut\144\160\160A@@@\176)print_int\144\160\160A@@@\176)print_tab\144\160\160A@@@\176*close_tbox\144\160\160A@@@\176*get_margin\144\160\160A@@@\176*open_hvbox\144\160\160A@@@\176*pp_set_tab\144\160\160B@@@\176*print_bool\144\160\160A@@@\176*print_char\144\160\160A@@@\176*set_margin\144\160\160A@@@\176+open_hovbox\144\160\160A@@@\176+pp_open_box\144\160\160B@@@\176+pp_open_tag\144\160\160B@@@\176+pp_print_as\144\160\160C@@@\176+pp_set_tags\144\160\160B@@@\176+print_break\144\160\160B@@@\176+print_float\144\160\160A@@@\176+print_flush\144\160\160A@@@\176+print_space\144\160\160A@@@\176,pp_close_box\144\160\160B@@@\176,pp_close_tag\144\160\160B@@@\176,pp_open_hbox\144\160\160B@@@\176,pp_open_tbox\144\160\160B@@@\176,pp_open_vbox\144\160\160B@@@\176,pp_print_cut\144\160\160B@@@\176,pp_print_int\144\160\160B@@@\176,pp_print_tab\144\160\160B@@@\176,print_string\144\160\160A@@@\176,print_tbreak\144\160\160B@@@\176-err_formatter\144\160@@@\176-force_newline\144\160\160A@@@\176-get_mark_tags\144\160\160A@@@\176-get_max_boxes\144\160\160A@@@\176-pp_close_tbox\144\160\160B@@@\176-pp_get_margin\144\160\160B@@\144\148\192B\160\176\001\006G%state@\160\176\001\006H%param@@\151\176\161E\161)pp_marginA\160\144\004\012@\176\1924stdlib-406/format.ml\001\003r\001o\197\001o\226\192\004\002\001\003r\001o\197\001o\241@\160BA\176-pp_open_hvbox\144\160\160B@@@\176-pp_print_bool\144\160\160B@@@\176-pp_print_char\144\160\160B@@@\176-pp_print_list\144\160\160D@@@\176-pp_print_text\144\160\160B@@@\176-pp_set_margin\144\160\160B@@@\176-print_newline\144\160\160A@@@\176-set_mark_tags\144\160\160A@@@\176-set_max_boxes\144\160\160A@@@\176-std_formatter\144\160@@@\176-str_formatter\144\160@@@\176.get_max_indent\144\160\160A@@@\176.get_print_tags\144\160\160A@@@\176.make_formatter\144\160\160B@@@\176.over_max_boxes\144\160\160A@@@\176.pp_open_hovbox\144\160\160B@@@\176.pp_print_break\144\160\160C@@@\176.pp_print_float\144\160\160B@@@\176.pp_print_flush\144\160\160B@@@\176.pp_print_space\144\160\160B@@@\176.set_max_indent\144\160\160A@@@\176.set_print_tags\144\160\160A@@@\176/pp_print_string\144\160\160B@@@\176/pp_print_tbreak\144\160\160C@@@\1760pp_force_newline\144\160\160B@@@\1760pp_get_mark_tags\144\160\160B@@\144\148\192B\160\176\001\005\190%state@\160\176\001\005\191\004\149@@\151\176\161V\161,pp_mark_tagsA\160\144\004\011@\176\192\004\148\001\002{\001T/\001TO\192\004\149\001\002{\001T/\001Ta@\160BA\1760pp_get_max_boxes\144\160\160B@@\144\148\192B\160\176\001\006*%state@\160\176\001\006+\004\173@@\151\176\161N\161,pp_max_boxesA\160\144\004\011@\176\192\004\172\001\003A\001i\238\001j\014\192\004\173\001\003A\001i\238\001j @\160BA\1760pp_print_newline\144\160\160B@@@\1760pp_set_mark_tags\144\160\160B@@\144\148\192B\160\176\001\005\184%state@\160\176\001\005\185!b@@\151\176\162V\144\0046\160\144\004\011\160\144\004\n@\176\192\004\203\001\002y\001S\195\001S\226\192\004\204\001\002y\001S\195\001S\249@\160BA\1760pp_set_max_boxes\144\160\160B@@@\1760print_if_newline\144\160\160A@@@\1761get_ellipsis_text\144\160\160A@@@\1761pp_get_max_indent\144\160\160B@@\144\148\192B\160\176\001\006?%state@\160\176\001\006@\004\243@@\151\176\161G\161-pp_max_indentA\160\144\004\011@\176\192\004\242\001\003_\001m\025\001m:\192\004\243\001\003_\001m\025\001mM@\160BA\1761pp_get_print_tags\144\160\160B@@\144\148\192B\160\176\001\005\187%state@\160\176\001\005\188\005\001\011@@\151\176\161U\161-pp_print_tagsA\160\144\004\011@\176\192\005\001\n\001\002z\001S\250\001T\027\192\005\001\011\001\002z\001S\250\001T.@\160BA\1761pp_over_max_boxes\144\160\160B@@@\1761pp_set_max_indent\144\160\160B@@@\1761pp_set_print_tags\144\160\160B@@\144\148\192B\160\176\001\005\181%state@\160\176\001\005\182!b@@\151\176\162U\144\004#\160\144\004\011\160\144\004\n@\176\192\005\001.\001\002x\001S\138\001S\170\192\005\001/\001\002x\001S\138\001S\194@\160BA\1761set_ellipsis_text\144\160\160A@@@\1763flush_str_formatter\144\160\160A@@@\1763formatter_of_buffer\144\160\160A@@@\1763pp_print_if_newline\144\160\160B@@@\1764pp_get_ellipsis_text\144\160\160B@@\144\148\192B\160\176\001\0063%state@\160\176\001\0064\005\001[@@\151\176\161O\161+pp_ellipsisA\160\144\004\011@\176\192\005\001Z\001\003G\001j\183\001j\219\192\005\001[\001\003G\001j\183\001j\236@\160BA\1764pp_set_ellipsis_text\144\160\160B@@\144\148\192B\160\176\001\0061%state@\160\176\001\0062!s@@\151\176\162O\144\004\025\160\144\004\011\160\144\004\n@\176\192\005\001t\001\003F\001j}\001j\160\192\005\001u\001\003F\001j}\001j\182@\160BA\1768add_symbolic_output_item\144\160\160B@@@\1768formatter_of_out_channel\144\160\160A@@@\1769set_formatter_out_channel\144\160\160A@@@\176:formatter_of_out_functions\144\160\160A@@@\176:get_symbolic_output_buffer\144\160\160A@@\144\148\192A\160\176\001\006\185#sob@@\147\176\151\176\161H\146#rev\160\145\176@$ListA@\176\192&_none_A@\000\255\004\002A\160\151\176\161@\1618symbolic_output_contentsA\160\144\004\024@\176\192\005\001\173\001\004@\002\000\000\135\137\002\000\000\135\148\192\005\001\174\001\004@\002\000\000\135\137\002\000\000\135\176@@\176\176\192\005\001\177\001\004@\002\000\000\135\137\002\000\000\135\139\004\004@BA\160BA\176;get_formatter_out_functions\144\160\160A@@@\176;get_formatter_tag_functions\144\160\160A@@@\176;make_symbolic_output_buffer\144\160\160A@@\144\148\192A\160\176\001\006\181\005\001\208@@\151\176\176@\144\144\004#A\160\146\160\018_i\000\000\000\000\000\144\176\"[]AA@\176\192\005\001\212\001\004:\002\000\000\134\242\002\000\000\134\244\192\005\001\213\001\004:\002\000\000\134\242\002\000\000\135\021@\160BA\176;set_formatter_out_functions\144\160\160A@@@\176;set_formatter_tag_functions\144\160\160A@@@\176\002\000\000\135@\192\005\001\250\001\004=\002\000\000\135>\002\000\000\135b@\160BA\176get_formatter_output_functions\144\160\160A@@@\176>pp_get_formatter_out_functions\144\160\160B@@@\176>pp_get_formatter_tag_functions\144\160\160B@@@\176>pp_set_formatter_out_functions\144\160\160B@@@\176>pp_set_formatter_tag_functions\144\160\160B@@@\176>set_formatter_output_functions\144\160\160B@@@\176\t!pp_get_formatter_output_functions\144\160\160B@@@\176\t!pp_set_formatter_output_functions\144\160\160C@@@\176\t\"get_all_formatter_output_functions\144\160\160A@@@\176\t\"set_all_formatter_output_functions\144\160\160D@@@\176\t#formatter_of_symbolic_output_buffer\144\160\160A@@@\176\t%pp_get_all_formatter_output_functions\144\160\160B@@@\176\t%pp_set_all_formatter_output_functions\144\160\160E@@@@", (* Genlex *)"\132\149\166\190\000\000\000\024\000\000\000\b\000\000\000\024\000\000\000\023\160\144\176*make_lexer\144\160\160A\160A@@@A", -(* Js_exn *)"\132\149\166\190\000\000\003\144\000\000\000\214\000\000\002\244\000\000\002\213\160\240\176*raiseError\144\160\160A@A\144\148\192A\160\176\001\003\249#str@@\151\176C\160\151\176\181%Error\160\160AA@\182%Error@@\160\144\004\015@\176\1920others/js_exn.mlq\001\007z\001\007\142\192\004\002q\001\007z\001\007\155@@\176\192\004\004q\001\007z\001\007|\192\004\005q\001\007z\001\007\171@\160BA\176-raiseUriError\144\160\160A@A\144\148\192A\160\176\001\004\017#str@@\151\176C\160\151\176\181(URIError\160\004 @\182(URIError@@\160\144\004\014@\176\192\004\031\000V\001\011}\001\011\144\192\004 \000V\001\011}\001\011\162@@\176\192\004\"\000V\001\011}\001\011\127\192\004#\000V\001\011}\001\011\163@\160BA\176.raiseEvalError\144\160\160A@A\144\148\192A\160\176\001\003\253#str@@\151\176C\160\151\176\181)EvalError\160\004>@\182)EvalError@@\160\144\004\014@\176\192\004=w\001\b\031\001\b3\192\004>w\001\b\031\001\bD@@\176\192\004@w\001\b\031\001\b!\192\004Aw\001\b\031\001\bY@\160BA\176.raiseTypeError\144\160\160A@A\144\148\192A\160\176\001\004\r#str@@\151\176C\160\151\176\181)TypeError\160\004\\@\182)TypeError@@\160\144\004\014@\176\192\004[\000P\001\n\231\001\n\250\192\004\\\000P\001\n\231\001\011\r@@\176\192\004^\000P\001\n\231\001\n\233\192\004_\000P\001\n\231\001\011\014@\160BA\176/raiseRangeError\144\160\160A@A\144\148\192A\160\176\001\004\001#str@@\151\176C\160\151\176\181*RangeError\160\004z@\182*RangeError@@\160\144\004\014@\176\192\004y}\001\b\211\001\b\231\192\004z}\001\b\211\001\b\249@@\176\192\004|}\001\b\211\001\b\213\192\004}}\001\b\211\001\t\015@\160BA\1760raiseSyntaxError\144\160\160A@A\144\148\192A\160\176\001\004\t#str@@\151\176C\160\151\176\181+SyntaxError\160\004\152@\182+SyntaxError@@\160\144\004\014@\176\192\004\151\000J\001\nJ\001\n]\192\004\152\000J\001\nJ\001\nr@@\176\192\004\154\000J\001\nJ\001\nL\192\004\155\000J\001\nJ\001\ns@\160BA\1763raiseReferenceError\144\160\160A@A\144\148\192A\160\176\001\004\005#str@@\151\176C\160\151\176\181.ReferenceError\160\004\182@\182.ReferenceError@@\160\144\004\014@\176\192\004\181\000D\001\t\159\001\t\178\192\004\182\000D\001\t\159\001\t\202@@\176\192\004\184\000D\001\t\159\001\t\161\192\004\185\000D\001\t\159\001\t\203@\160BAA", +(* Js_exn *)"\132\149\166\190\000\000\004'\000\000\000\246\000\000\003g\000\000\003@\160\b\000\000 \000\176*raiseError\144\160\160A@A\144\148\192A\160\176\001\0048#str@@\151\176C\160\151\176\181%Error\160\160AA@\182%Error@@\160\144\004\015@\176\1920others/js_exn.mlu\001\007\213\001\007\233\192\004\002u\001\007\213\001\007\246@@\176\192\004\004u\001\007\213\001\007\215\192\004\005u\001\007\213\001\b\006@\160BA\176-raiseUriError\144\160\160A@A\144\148\192A\160\176\001\004P#str@@\151\176C\160\151\176\181(URIError\160\004 @\182(URIError@@\160\144\004\014@\176\192\004\031\000Z\001\011\216\001\011\235\192\004 \000Z\001\011\216\001\011\253@@\176\192\004\"\000Z\001\011\216\001\011\218\192\004#\000Z\001\011\216\001\011\254@\160BA\176.raiseEvalError\144\160\160A@A\144\148\192A\160\176\001\004<#str@@\151\176C\160\151\176\181)EvalError\160\004>@\182)EvalError@@\160\144\004\014@\176\192\004={\001\bz\001\b\142\192\004>{\001\bz\001\b\159@@\176\192\004@{\001\bz\001\b|\192\004A{\001\bz\001\b\180@\160BA\176.raiseTypeError\144\160\160A@A\144\148\192A\160\176\001\004L#str@@\151\176C\160\151\176\181)TypeError\160\004\\@\182)TypeError@@\160\144\004\014@\176\192\004[\000T\001\011B\001\011U\192\004\\\000T\001\011B\001\011h@@\176\192\004^\000T\001\011B\001\011D\192\004_\000T\001\011B\001\011i@\160BA\176/raiseRangeError\144\160\160A@A\144\148\192A\160\176\001\004@#str@@\151\176C\160\151\176\181*RangeError\160\004z@\182*RangeError@@\160\144\004\014@\176\192\004y\000A\001\t.\001\tB\192\004z\000A\001\t.\001\tT@@\176\192\004|\000A\001\t.\001\t0\192\004}\000A\001\t.\001\tj@\160BA\1760anyToExnInternal\144\160\160A@@\144\148\192A\160\176\001\003\249!x@@\147\176\151\176\161A\1468internalToOCamlException\160\145\176@2Caml_js_exceptionsA@\176\192&_none_A@\000\255\004\002A\160\144\004\018@\176\176\192\004\156q\001\007~\001\007\130\192\004\157q\001\007~\001\007\186@BA\160BA\1760raiseSyntaxError\144\160\160A@A\144\148\192A\160\176\001\004H#str@@\151\176C\160\151\176\181+SyntaxError\160\004\184@\182+SyntaxError@@\160\144\004\014@\176\192\004\183\000N\001\n\165\001\n\184\192\004\184\000N\001\n\165\001\n\205@@\176\192\004\186\000N\001\n\165\001\n\167\192\004\187\000N\001\n\165\001\n\206@\160BA\1763raiseReferenceError\144\160\160A@A\144\148\192A\160\176\001\004D#str@@\151\176C\160\151\176\181.ReferenceError\160\004\214@\182.ReferenceError@@\160\144\004\014@\176\192\004\213\000H\001\t\250\001\n\r\192\004\214\000H\001\t\250\001\n%@@\176\192\004\216\000H\001\t\250\001\t\252\192\004\217\000H\001\t\250\001\n&@\160BAA", (* Js_int *)"\132\149\166\190\000\000\000^\000\000\000\028\000\000\000X\000\000\000U\160\144\176%equal\144\160\160B@@\144\148\192B\160\176\001\003\242!x@\160\176\001\003\243!y@@\151\176\153@\160\144\004\n\160\144\004\t@\176\1920others/js_int.ml\001\000\161\001\023\132\001\023\155\192\004\002\001\000\161\001\023\132\001\023\160@\160BAA", (* Js_obj *)"\132\149\166\190\000\000\000\003\000\000\000\001\000\000\000\003\000\000\000\003\160\128A", (* Lexing *)"\132\149\166\190\000\000\003\030\000\000\000\197\000\000\002\161\000\000\002|\160\b\000\000D\000\176&engine\144\160\160C@@@\176&lexeme\144\160\160A@@@\176(new_line\144\160\160A@@@\176*lexeme_end\144\160\160A@@\144\148\192A\160\176\001\005\012&lexbuf@@\151\176\161C\161(pos_cnum@\160\151\176\161K\161*lex_curr_pA\160\144\004\015@\176\1924stdlib-406/lexing.ml\001\000\216\001\027w\001\027\143\192\004\002\001\000\216\001\027w\001\027\160@@\176\004\004\192\004\004\001\000\216\001\027w\001\027\169@\160BA\176*new_engine\144\160\160C@@@\176*sub_lexeme\144\160\160C@@@\176+flush_input\144\160\160A@@@\176+from_string\144\160\160A@@@\176+lexeme_char\144\160\160B@@@\176,from_channel\144\160\160A@@@\176,lexeme_end_p\144\160\160A@@\144\148\192A\160\176\001\005\016&lexbuf@@\151\176\161K\161\0047A\160\144\004\b@\176\192\0046\001\000\219\001\027\218\001\027\244\192\0047\001\000\219\001\027\218\001\028\005@\160BA\176,lexeme_start\144\160\160A@@\144\148\192A\160\176\001\005\n&lexbuf@@\151\176\161C\161\004R@\160\151\176\161J\161+lex_start_pA\160\144\004\014@\176\192\004Q\001\000\215\001\027A\001\027[\192\004R\001\000\215\001\027A\001\027m@@\176\004\003\192\004T\001\000\215\001\027A\001\027v@\160BA\176-from_function\144\160\160A@@@\176.lexeme_start_p\144\160\160A@@\144\148\192A\160\176\001\005\014&lexbuf@@\151\176\161J\161\004\029A\160\144\004\b@\176\192\004m\001\000\218\001\027\171\001\027\199\192\004n\001\000\218\001\027\171\001\027\217@\160BA\176.sub_lexeme_opt\144\160\160C@@@\176/sub_lexeme_char\144\160\160B@@\144\148\192B\160\176\001\005\001&lexbuf@\160\176\001\005\002!i@@\151\176c\160\151\176\161A\161*lex_bufferA\160\144\004\015@\176\192\004\142\001\000\203\001\026?\001\026h\192\004\143\001\000\203\001\026?\001\026y@\160\144\004\017@\176\192\004\147\001\000\203\001\026?\001\026^\192\004\148\001\000\203\001\026?\001\026{@\160BA\1763sub_lexeme_char_opt\144\160\160B@@@A", @@ -99256,11 +99140,11 @@ end = struct let add_lam_module_ident = Lam_module_ident.Hash_set.add let create = Lam_module_ident.Hash_set.create let count_hard_dependencies hard_dependencies = - object(self : 'self_type) - inherit Js_fold.fold as super + object + inherit Js_iter.iter as super method! module_id vid = - add_lam_module_ident hard_dependencies vid; self - method! expression x : 'self_type = + add_lam_module_ident hard_dependencies vid + method! expression x = (* check {!Js_pass_scope} when making changes *) (match Js_block_runtime.check_additional_id x with | Some id -> @@ -99273,7 +99157,7 @@ let count_hard_dependencies hard_dependencies = let calculate_hard_dependencies block = let hard_dependencies = create 17 in - let _ : Js_fold.fold = (count_hard_dependencies hard_dependencies)#block block in + (count_hard_dependencies hard_dependencies)#block block ; hard_dependencies (* @@ -101479,241 +101363,199 @@ module Js_map #1 "js_map.ml" open J -class virtual map = object -((o : 'self_type)) -method unknown : 'a. 'a -> 'a = fun x -> x -method string : string -> string = fun x -> x +let unknown : 'a. 'a -> 'a = fun x -> x +class map = object +((_self : 'self_type)) method option : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a option -> 'a_out option = fun _f_a -> - function | None -> None | Some _x -> let _x = _f_a o _x in Some _x + function | None -> None | Some _x -> let _x = _f_a _self _x in Some _x method list : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a list -> 'a_out list = fun _f_a -> function | [] -> [] | _x :: _x_i1 -> - let _x = _f_a o _x in - let _x_i1 = o#list _f_a _x_i1 in _x :: _x_i1 -method int32 : int32 -> int32 = fun x -> x -method int : int -> int = fun x -> x -method bool : bool -> bool = fun x -> x -method label : label -> label = o#string -method binop : binop -> binop = o#unknown -method int_op : int_op -> int_op = o#unknown -method kind : kind -> kind = o#unknown -method property : property -> property = o#unknown -method number : number -> number = o#unknown -method mutable_flag : mutable_flag -> mutable_flag = o#unknown -method ident_info : ident_info -> ident_info = o#unknown -method exports : exports -> exports = o#unknown -method tag_info : tag_info -> tag_info = o#unknown -method required_modules : required_modules -> required_modules = o#list (fun o -> o#module_id) -method property_name : property_name -> property_name = o#unknown -method ident : ident -> ident = o#unknown -method module_id : module_id -> module_id = fun { id = _x0;kind = _x1} -> let _x0 = o#ident _x0 in -let _x1 = o#unknown _x1 in {id = _x0;kind = _x1} + let _x = _f_a _self _x in + let _x_i1 = _self#list _f_a _x_i1 in _x :: _x_i1 +method label : label -> label = unknown +method required_modules : required_modules -> required_modules = _self#list (fun _self -> _self#module_id) +method ident : ident -> ident = unknown +method module_id : module_id -> module_id = fun { id = _x0;kind = _x1} -> let _x0 = _self#ident _x0 in {id = _x0;kind = _x1} method vident : vident -> vident = function | Id ( _x0) -> -let _x0 = o#ident _x0 in +let _x0 = _self#ident _x0 in Id ( _x0) |Qualified ( _x0,_x1) -> -let _x0 = o#module_id _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in +let _x0 = _self#module_id _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in Qualified ( _x0,_x1) -method exception_ident : exception_ident -> exception_ident = o#ident -method for_ident : for_ident -> for_ident = o#ident -method for_direction : for_direction -> for_direction = o#unknown -method property_map : property_map -> property_map = o#list (fun o -> fun ( _x0,_x1) -> let _x0 = o#property_name _x0 in let _x1 = o#expression _x1 in _x0,_x1) -method length_object : length_object -> length_object = o#unknown +method exception_ident : exception_ident -> exception_ident = _self#ident +method for_ident : for_ident -> for_ident = _self#ident +method for_direction : for_direction -> for_direction = unknown +method property_map : property_map -> property_map = _self#list (fun _self -> fun ( _x0,_x1) -> let _x1 = _self#expression _x1 in _x0,_x1) +method length_object : length_object -> length_object = unknown method expression_desc : expression_desc -> expression_desc = function | Length ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#length_object _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#length_object _x1 in Length ( _x0,_x1) |Char_of_int ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Char_of_int ( _x0) |Char_to_int ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Char_to_int ( _x0) |Is_null_or_undefined ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Is_null_or_undefined ( _x0) |String_append ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in String_append ( _x0,_x1) -|Bool ( _x0) -> -let _x0 = o#bool _x0 in -Bool ( _x0) +|Bool _ as v -> v |Typeof ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Typeof ( _x0) |Js_not ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Js_not ( _x0) |Seq ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in Seq ( _x0,_x1) |Cond ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#expression _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in +let _x2 = _self#expression _x2 in Cond ( _x0,_x1,_x2) |Bin ( _x0,_x1,_x2) -> -let _x0 = o#binop _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#expression _x2 in +let _x1 = _self#expression _x1 in +let _x2 = _self#expression _x2 in Bin ( _x0,_x1,_x2) |FlatCall ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in FlatCall ( _x0,_x1) |Call ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#expression) _x1 in -let _x2 = o#unknown _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#expression) _x1 in Call ( _x0,_x1,_x2) |String_index ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in String_index ( _x0,_x1) |Array_index ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in Array_index ( _x0,_x1) |Static_index ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#string _x1 in -let _x2 = o#option (fun o -> o#int32) _x2 in +let _x0 = _self#expression _x0 in +let _x2 = _self#option (fun _self -> unknown) _x2 in Static_index ( _x0,_x1,_x2) |New ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#option (fun o -> o#list (fun o -> o#expression)) _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 in New ( _x0,_x1) |Var ( _x0) -> -let _x0 = o#vident _x0 in +let _x0 = _self#vident _x0 in Var ( _x0) |Fun ( _x0,_x1,_x2,_x3) -> -let _x0 = o#bool _x0 in -let _x1 = o#list (fun o -> o#ident) _x1 in -let _x2 = o#block _x2 in -let _x3 = o#unknown _x3 in +let _x1 = _self#list (fun _self -> _self#ident) _x1 in +let _x2 = _self#block _x2 in Fun ( _x0,_x1,_x2,_x3) -|Str ( _x0,_x1) -> -let _x0 = o#bool _x0 in -let _x1 = o#string _x1 in -Str ( _x0,_x1) -|Unicode ( _x0) -> -let _x0 = o#string _x0 in -Unicode ( _x0) -|Raw_js_code ( _x0) -> -let _x0 = o#unknown _x0 in -Raw_js_code ( _x0) +|Str _ as v -> v +|Unicode _ as v -> v +|Raw_js_code _ as v -> v |Array ( _x0,_x1) -> -let _x0 = o#list (fun o -> o#expression) _x0 in -let _x1 = o#mutable_flag _x1 in +let _x0 = _self#list (fun _self -> _self#expression) _x0 in Array ( _x0,_x1) |Optional_block ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#bool _x1 in +let _x0 = _self#expression _x0 in Optional_block ( _x0,_x1) |Caml_block ( _x0,_x1,_x2,_x3) -> -let _x0 = o#list (fun o -> o#expression) _x0 in -let _x1 = o#mutable_flag _x1 in -let _x2 = o#expression _x2 in -let _x3 = o#tag_info _x3 in +let _x0 = _self#list (fun _self -> _self#expression) _x0 in +let _x2 = _self#expression _x2 in Caml_block ( _x0,_x1,_x2,_x3) |Caml_block_tag ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Caml_block_tag ( _x0) -|Number ( _x0) -> -let _x0 = o#number _x0 in -Number ( _x0) +|Number _ as v -> v |Object ( _x0) -> -let _x0 = o#property_map _x0 in +let _x0 = _self#property_map _x0 in Object ( _x0) -|Undefined -> Undefined -|Null -> Null -method for_ident_expression : for_ident_expression -> for_ident_expression = o#expression -method finish_ident_expression : finish_ident_expression -> finish_ident_expression = o#expression +|Undefined as v -> v +|Null as v -> v +method for_ident_expression : for_ident_expression -> for_ident_expression = _self#expression +method finish_ident_expression : finish_ident_expression -> finish_ident_expression = _self#expression method statement_desc : statement_desc -> statement_desc = function | Block ( _x0) -> -let _x0 = o#block _x0 in +let _x0 = _self#block _x0 in Block ( _x0) |Variable ( _x0) -> -let _x0 = o#variable_declaration _x0 in +let _x0 = _self#variable_declaration _x0 in Variable ( _x0) |Exp ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Exp ( _x0) |If ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#block _x1 in -let _x2 = o#block _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#block _x1 in +let _x2 = _self#block _x2 in If ( _x0,_x1,_x2) |While ( _x0,_x1,_x2,_x3) -> -let _x0 = o#option (fun o -> o#label) _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#block _x2 in -let _x3 = o#unknown _x3 in +let _x0 = _self#option (fun _self -> _self#label) _x0 in +let _x1 = _self#expression _x1 in +let _x2 = _self#block _x2 in While ( _x0,_x1,_x2,_x3) |ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> -let _x0 = o#option (fun o -> o#for_ident_expression) _x0 in -let _x1 = o#finish_ident_expression _x1 in -let _x2 = o#for_ident _x2 in -let _x3 = o#for_direction _x3 in -let _x4 = o#block _x4 in -let _x5 = o#unknown _x5 in +let _x0 = _self#option (fun _self -> _self#for_ident_expression) _x0 in +let _x1 = _self#finish_ident_expression _x1 in +let _x2 = _self#for_ident _x2 in +let _x3 = _self#for_direction _x3 in +let _x4 = _self#block _x4 in ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) |Continue ( _x0) -> -let _x0 = o#label _x0 in +let _x0 = _self#label _x0 in Continue ( _x0) -|Break -> Break +|Break as v -> v |Return ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Return ( _x0) |Int_switch ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#int_clause) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#int_clause) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in Int_switch ( _x0,_x1,_x2) |String_switch ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#string_clause) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#string_clause) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in String_switch ( _x0,_x1,_x2) |Throw ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Throw ( _x0) |Try ( _x0,_x1,_x2) -> -let _x0 = o#block _x0 in -let _x1 = o#option (fun o -> fun ( _x0,_x1) -> let _x0 = o#exception_ident _x0 in let _x1 = o#block _x1 in _x0,_x1) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#block _x0 in +let _x1 = _self#option (fun _self -> fun ( _x0,_x1) -> let _x0 = _self#exception_ident _x0 in let _x1 = _self#block _x1 in _x0,_x1) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in Try ( _x0,_x1,_x2) -|Debugger -> Debugger -method expression : expression -> expression = fun { expression_desc = _x0;comment = _x1} -> let _x0 = o#expression_desc _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in {expression_desc = _x0;comment = _x1} -method statement : statement -> statement = fun { statement_desc = _x0;comment = _x1} -> let _x0 = o#statement_desc _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in {statement_desc = _x0;comment = _x1} -method variable_declaration : variable_declaration -> variable_declaration = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _x0 = o#ident _x0 in -let _x1 = o#option (fun o -> o#expression) _x1 in -let _x2 = o#property _x2 in -let _x3 = o#ident_info _x3 in {ident = _x0;value = _x1;property = _x2;ident_info = _x3} -method string_clause : string_clause -> string_clause = fun ( _x0,_x1) -> let _x0 = o#string _x0 in let _x1 = o#case_clause _x1 in _x0,_x1 -method int_clause : int_clause -> int_clause = fun ( _x0,_x1) -> let _x0 = o#int _x0 in let _x1 = o#case_clause _x1 in _x0,_x1 -method case_clause : case_clause -> case_clause = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _x0 = o#block _x0 in -let _x1 = o#bool _x1 in -let _x2 = o#option (fun o -> o#string) _x2 in {switch_body = _x0;should_break = _x1;comment = _x2} -method block : block -> block = o#list (fun o -> o#statement) -method program : program -> program = fun { block = _x0;exports = _x1;export_set = _x2} -> let _x0 = o#block _x0 in -let _x1 = o#exports _x1 in -let _x2 = o#unknown _x2 in {block = _x0;exports = _x1;export_set = _x2} -method deps_program : deps_program -> deps_program = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _x0 = o#program _x0 in -let _x1 = o#required_modules _x1 in -let _x2 = o#option (fun o -> o#string) _x2 in {program = _x0;modules = _x1;side_effect = _x2} +|Debugger as v -> v +method expression : expression -> expression = fun { expression_desc = _x0;comment = _x1} -> let _x0 = _self#expression_desc _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in {expression_desc = _x0;comment = _x1} +method statement : statement -> statement = fun { statement_desc = _x0;comment = _x1} -> let _x0 = _self#statement_desc _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in {statement_desc = _x0;comment = _x1} +method variable_declaration : variable_declaration -> variable_declaration = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _x0 = _self#ident _x0 in +let _x1 = _self#option (fun _self -> _self#expression) _x1 in {ident = _x0;value = _x1;property = _x2;ident_info = _x3} +method string_clause : string_clause -> string_clause = fun ( _x0,_x1) -> let _x1 = _self#case_clause _x1 in _x0,_x1 +method int_clause : int_clause -> int_clause = fun ( _x0,_x1) -> let _x1 = _self#case_clause _x1 in _x0,_x1 +method case_clause : case_clause -> case_clause = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _x0 = _self#block _x0 in +let _x2 = _self#option (fun _self -> unknown) _x2 in {switch_body = _x0;should_break = _x1;comment = _x2} +method block : block -> block = _self#list (fun _self -> _self#statement) +method program : program -> program = fun { block = _x0;exports = _x1;export_set = _x2} -> let _x0 = _self#block _x0 in {block = _x0;exports = _x1;export_set = _x2} +method deps_program : deps_program -> deps_program = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _x0 = _self#program _x0 in +let _x1 = _self#required_modules _x1 in +let _x2 = _self#option (fun _self -> unknown) _x2 in {program = _x0;modules = _x1;side_effect = _x2} end end @@ -101955,8 +101797,8 @@ type meta_info = let mark_dead_code (js : J.program) : J.program = let ident_use_stats : meta_info Hash_ident.t = Hash_ident.create 17 in - let mark_dead : Js_fold.fold = object (self) - inherit Js_fold.fold + let mark_dead : Js_iter.iter = object (self) + inherit Js_iter.iter method! ident ident = (match Hash_ident.find_opt ident_use_stats ident with | None -> (* First time *) @@ -101965,14 +101807,13 @@ let mark_dead_code (js : J.program) : J.program = | Some Recursive -> () | Some (Info x) -> Js_op_util.update_used_stats x Used ) - ; self method! variable_declaration vd = match vd.ident_info.used_stats with | Dead_pure - -> self + -> () | Dead_non_pure -> begin match vd.value with - | None -> self + | None -> () | Some x -> self#expression x end | _ -> @@ -101980,7 +101821,7 @@ let mark_dead_code (js : J.program) : J.program = let pure = match value with | None -> true - | Some x -> ignore (self#expression x); Js_analyzer.no_side_effect_expression x in + | Some x -> (self#expression x); Js_analyzer.no_side_effect_expression x in ( let () = if Set_ident.mem js.export_set ident then @@ -101999,9 +101840,9 @@ let mark_dead_code (js : J.program) : J.program = | None -> (* First time *) Hash_ident.add ident_use_stats ident (Info ident_info); Js_op_util.update_used_stats ident_info - (if pure then Scanning_pure else Scanning_non_pure)); self + (if pure then Scanning_pure else Scanning_non_pure)) end in - let _ = (mark_dead#program js) in + let () = (mark_dead#program js) in Hash_ident.iter ident_use_stats (fun _id (info : meta_info) -> match info with | Info ({used_stats = Scanning_pure} as info) -> @@ -102180,6 +102021,204 @@ let program (js : J.program) = since the benefit is not obvious *) +end +module Js_fold += struct +#1 "js_fold.ml" + + open J + let [@inline] unknown _self _ = _self + class fold = + object ((_self : 'self_type)) + method option : + 'a. ('self_type -> 'a -> 'self_type) -> 'a option -> 'self_type = + fun _f_a -> function | None -> _self | Some _x -> let _self = _f_a _self _x in _self + method list : + 'a. ('self_type -> 'a -> 'self_type) -> 'a list -> 'self_type = + fun _f_a -> + function + | [] -> _self + | _x :: _x_i1 -> let _self = _f_a _self _x in let _self = _self#list _f_a _x_i1 in _self + method label : label -> 'self_type = unknown _self +method required_modules : required_modules -> 'self_type = _self#list (fun _self -> _self#module_id) +method ident : ident -> 'self_type = unknown _self +method module_id : module_id -> 'self_type = fun { id = _x0;kind = _x1} -> let _self = _self#ident _x0 in _self +method vident : vident -> 'self_type = function +| Id ( _x0) -> +let _self = _self#ident _x0 in + _self +|Qualified ( _x0,_x1) -> +let _self = _self#module_id _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in + _self +method exception_ident : exception_ident -> 'self_type = _self#ident +method for_ident : for_ident -> 'self_type = _self#ident +method for_direction : for_direction -> 'self_type = unknown _self +method property_map : property_map -> 'self_type = _self#list (fun _self -> fun ( _x0,_x1) -> let _self = _self#expression _x1 in _self) +method length_object : length_object -> 'self_type = unknown _self +method expression_desc : expression_desc -> 'self_type = function +| Length ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#length_object _x1 in + _self +|Char_of_int ( _x0) -> +let _self = _self#expression _x0 in + _self +|Char_to_int ( _x0) -> +let _self = _self#expression _x0 in + _self +|Is_null_or_undefined ( _x0) -> +let _self = _self#expression _x0 in + _self +|String_append ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Bool _ -> _self +|Typeof ( _x0) -> +let _self = _self#expression _x0 in + _self +|Js_not ( _x0) -> +let _self = _self#expression _x0 in + _self +|Seq ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Cond ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in +let _self = _self#expression _x2 in + _self +|Bin ( _x0,_x1,_x2) -> +let _self = _self#expression _x1 in +let _self = _self#expression _x2 in + _self +|FlatCall ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Call ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#expression) _x1 in + _self +|String_index ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Array_index ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Static_index ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#option (fun _self -> unknown _self) _x2 in + _self +|New ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 in + _self +|Var ( _x0) -> +let _self = _self#vident _x0 in + _self +|Fun ( _x0,_x1,_x2,_x3) -> +let _self = _self#list (fun _self -> _self#ident) _x1 in +let _self = _self#block _x2 in + _self +|Str _ -> _self +|Unicode _ -> _self +|Raw_js_code _ -> _self +|Array ( _x0,_x1) -> +let _self = _self#list (fun _self -> _self#expression) _x0 in + _self +|Optional_block ( _x0,_x1) -> +let _self = _self#expression _x0 in + _self +|Caml_block ( _x0,_x1,_x2,_x3) -> +let _self = _self#list (fun _self -> _self#expression) _x0 in +let _self = _self#expression _x2 in + _self +|Caml_block_tag ( _x0) -> +let _self = _self#expression _x0 in + _self +|Number _ -> _self +|Object ( _x0) -> +let _self = _self#property_map _x0 in + _self +|Undefined -> _self +|Null -> _self +method for_ident_expression : for_ident_expression -> 'self_type = _self#expression +method finish_ident_expression : finish_ident_expression -> 'self_type = _self#expression +method statement_desc : statement_desc -> 'self_type = function +| Block ( _x0) -> +let _self = _self#block _x0 in + _self +|Variable ( _x0) -> +let _self = _self#variable_declaration _x0 in + _self +|Exp ( _x0) -> +let _self = _self#expression _x0 in + _self +|If ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#block _x1 in +let _self = _self#block _x2 in + _self +|While ( _x0,_x1,_x2,_x3) -> +let _self = _self#option (fun _self -> _self#label) _x0 in +let _self = _self#expression _x1 in +let _self = _self#block _x2 in + _self +|ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> +let _self = _self#option (fun _self -> _self#for_ident_expression) _x0 in +let _self = _self#finish_ident_expression _x1 in +let _self = _self#for_ident _x2 in +let _self = _self#for_direction _x3 in +let _self = _self#block _x4 in + _self +|Continue ( _x0) -> +let _self = _self#label _x0 in + _self +|Break -> _self +|Return ( _x0) -> +let _self = _self#expression _x0 in + _self +|Int_switch ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#int_clause) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|String_switch ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#string_clause) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|Throw ( _x0) -> +let _self = _self#expression _x0 in + _self +|Try ( _x0,_x1,_x2) -> +let _self = _self#block _x0 in +let _self = _self#option (fun _self -> fun ( _x0,_x1) -> let _self = _self#exception_ident _x0 in let _self = _self#block _x1 in _self) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|Debugger -> _self +method expression : expression -> 'self_type = fun { expression_desc = _x0;comment = _x1} -> let _self = _self#expression_desc _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in _self +method statement : statement -> 'self_type = fun { statement_desc = _x0;comment = _x1} -> let _self = _self#statement_desc _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in _self +method variable_declaration : variable_declaration -> 'self_type = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _self = _self#ident _x0 in +let _self = _self#option (fun _self -> _self#expression) _x1 in _self +method string_clause : string_clause -> 'self_type = fun ( _x0,_x1) -> let _self = _self#case_clause _x1 in _self +method int_clause : int_clause -> 'self_type = fun ( _x0,_x1) -> let _self = _self#case_clause _x1 in _self +method case_clause : case_clause -> 'self_type = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _self = _self#block _x0 in +let _self = _self#option (fun _self -> unknown _self) _x2 in _self +method block : block -> 'self_type = _self#list (fun _self -> _self#statement) +method program : program -> 'self_type = fun { block = _x0;exports = _x1;export_set = _x2} -> let _self = _self#block _x0 in _self +method deps_program : deps_program -> 'self_type = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _self = _self#program _x0 in +let _self = _self#required_modules _x1 in +let _self = _self#option (fun _self -> unknown _self) _x2 in _self + end + end module Js_pass_scope : sig #1 "js_pass_scope.mli" @@ -102632,22 +102671,19 @@ let count_collects (* collect used status*) (stats : int Hash_ident.t) (* collect all def sites *) - (defined_idents : J.variable_declaration Hash_ident.t) : Js_fold.fold + (defined_idents : J.variable_declaration Hash_ident.t) : Js_iter.iter = object (self) - inherit Js_fold.fold - + inherit Js_iter.iter method! variable_declaration ({ident; value ; property = _ ; ident_info = _} as v) = Hash_ident.add defined_idents ident v; match value with - | None -> - self + | None -> () | Some x -> self#expression x - method! ident id = add_use stats id; self - + method! ident id = add_use stats id end @@ -102656,7 +102692,7 @@ let get_stats (program : J.program) : J.variable_declaration Hash_ident.t let stats : int Hash_ident.t = Hash_ident.create 83 in let defined_idents : J.variable_declaration Hash_ident.t = Hash_ident.create 83 in let my_export_set = program.export_set in - let _ : Js_fold.fold = (count_collects stats defined_idents) #program program in + (count_collects stats defined_idents) #program program; post_process_stats my_export_set defined_idents stats end diff --git a/lib/4.06.1/unstable/js_compiler.ml.d b/lib/4.06.1/unstable/js_compiler.ml.d index f3282cbf4f..c7520cec5a 100644 --- a/lib/4.06.1/unstable/js_compiler.ml.d +++ b/lib/4.06.1/unstable/js_compiler.ml.d @@ -180,6 +180,7 @@ ../lib/4.06.1/unstable/js_compiler.ml: ./core/js_fold_basic.mli ../lib/4.06.1/unstable/js_compiler.ml: ./core/js_fun_env.ml ../lib/4.06.1/unstable/js_compiler.ml: ./core/js_fun_env.mli +../lib/4.06.1/unstable/js_compiler.ml: ./core/js_iter.ml ../lib/4.06.1/unstable/js_compiler.ml: ./core/js_long.ml ../lib/4.06.1/unstable/js_compiler.ml: ./core/js_long.mli ../lib/4.06.1/unstable/js_compiler.ml: ./core/js_map.ml diff --git a/lib/4.06.1/unstable/js_refmt_compiler.ml b/lib/4.06.1/unstable/js_refmt_compiler.ml index 9c990d4171..6c6bc387cd 100644 --- a/lib/4.06.1/unstable/js_refmt_compiler.ml +++ b/lib/4.06.1/unstable/js_refmt_compiler.ml @@ -13,7 +13,7 @@ val module_data : end = struct #1 "builtin_cmi_datasets.ml" -(* 180a946f426a7bdebc6e18e32d9734eb *) +(* 0de2b622a7d93a9203358884b6dfb0cf *) let module_names : string array = Obj.magic ( "Js" (* 5875 *), "Arg" (* 4085 *), @@ -42,7 +42,7 @@ let module_names : string array = Obj.magic ( "Digest" (* 1335 *), "Format" (* 16006 *), "Genlex" (* 726 *), -"Js_exn" (* 1364 *), +"Js_exn" (* 1432 *), "Js_int" (* 1273 *), "Js_obj" (* 677 *), "Lexing" (* 3084 *), @@ -165,7 +165,7 @@ let module_data : string array = Obj.magic ( (* Digest *) "\132\149\166\190\000\000\005#\000\000\001 \000\000\004\006\000\000\003\215\192&Digest\160\177\176\001\004\186!t@\b\000\000,\000@@@A\144\176\179\144\176O&string@@\144@\002\005\245\225\000\000\254@@\176\192&_none_A@\000\255\004\002A@@\160@@A\160\160\176\001\004\187'compare@\192\176\193@\176\179\144\004\024@\144@\002\005\245\225\000\000\249\176\193@\176\179\004\006@\144@\002\005\245\225\000\000\250\176\179\144\176A#int@@\144@\002\005\245\225\000\000\251@\002\005\245\225\000\000\252@\002\005\245\225\000\000\253@\004\026@\160\160\176\001\004\188%equal@\192\176\193@\176\179\004\022@\144@\002\005\245\225\000\000\244\176\193@\176\179\004\027@\144@\002\005\245\225\000\000\245\176\179\144\176E$bool@@\144@\002\005\245\225\000\000\246@\002\005\245\225\000\000\247@\002\005\245\225\000\000\248@\004/@\160\160\176\001\004\189&string@\192\176\193@\176\179\144\004<@\144@\002\005\245\225\000\000\241\176\179\004/@\144@\002\005\245\225\000\000\242@\002\005\245\225\000\000\243@\004=@\160\160\176\001\004\190%bytes@\192\176\193@\176\179\144\176C%bytes@@\144@\002\005\245\225\000\000\238\176\179\004?@\144@\002\005\245\225\000\000\239@\002\005\245\225\000\000\240@\004M@\160\160\176\001\004\191)substring@\192\176\193@\176\179\144\004Z@\144@\002\005\245\225\000\000\231\176\193@\176\179\144\004F@\144@\002\005\245\225\000\000\232\176\193@\176\179\144\004L@\144@\002\005\245\225\000\000\233\176\179\004Y@\144@\002\005\245\225\000\000\234@\002\005\245\225\000\000\235@\002\005\245\225\000\000\236@\002\005\245\225\000\000\237@\004g@\160\160\176\001\004\192(subbytes@\192\176\193@\176\179\144\004*@\144@\002\005\245\225\000\000\224\176\193@\176\179\144\004`@\144@\002\005\245\225\000\000\225\176\193@\176\179\144\004f@\144@\002\005\245\225\000\000\226\176\179\004s@\144@\002\005\245\225\000\000\227@\002\005\245\225\000\000\228@\002\005\245\225\000\000\229@\002\005\245\225\000\000\230@\004\129@\160\160\176\001\004\193'channel@\192\176\193@\176\179\177\144\176@*PervasivesA*in_channel\000\255@\144@\002\005\245\225\000\000\219\176\193@\176\179\144\004~@\144@\002\005\245\225\000\000\220\176\179\004\139@\144@\002\005\245\225\000\000\221@\002\005\245\225\000\000\222@\002\005\245\225\000\000\223\144\224-caml_md5_chanBA \160@\160@@@\004\159@\160\160\176\001\004\194$file@\192\176\193@\176\179\144\004\172@\144@\002\005\245\225\000\000\216\176\179\004\159@\144@\002\005\245\225\000\000\217@\002\005\245\225\000\000\218@\004\173@\160\160\176\001\004\195&output@\192\176\193@\176\179\177\004,+out_channel\000\255@\144@\002\005\245\225\000\000\211\176\193@\176\179\004\176@\144@\002\005\245\225\000\000\212\176\179\144\176F$unit@@\144@\002\005\245\225\000\000\213@\002\005\245\225\000\000\214@\002\005\245\225\000\000\215@\004\196@\160\160\176\001\004\196%input@\192\176\193@\176\179\177\004C*in_channel\000\255@\144@\002\005\245\225\000\000\208\176\179\004\197@\144@\002\005\245\225\000\000\209@\002\005\245\225\000\000\210@\004\211@\160\160\176\001\004\197&to_hex@\192\176\193@\176\179\004\207@\144@\002\005\245\225\000\000\205\176\179\144\004\227@\144@\002\005\245\225\000\000\206@\002\005\245\225\000\000\207@\004\225@\160\160\176\001\004\198(from_hex@\192\176\193@\176\179\144\004\238@\144@\002\005\245\225\000\000\202\176\179\004\225@\144@\002\005\245\225\000\000\203@\002\005\245\225\000\000\204@\004\239@@\160\160&Digest\1440g\162\017DR\249\130\170t\240z\140\164sCu\160\160*Pervasives\1440\161\171\015\212m\226s\245\200\018\157M:VVF\160\160\"Js\14409\154\"!\241\252\216]\177\145cA\131\028\026\200\160\1608CamlinternalFormatBasics\1440\176\204G\0192\227\021\136k\159\234\t\245:us\160\160.Bs_stdlib_mini\1440<\2522V\168\021\178\216\170\252z\175\016r\000\000\012x\000\000,\156\000\000+\012\192&Format\160\177\176\001\004\146)formatter@\b\000\000,\000@@@A@@@\176\192&_none_A@\000\255\004\002A@@\160@@A\160\160\176\001\004\147+pp_open_box@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\250\176\193@\176\179\144\176A#int@@\144@\002\005\245\225\000\000\251\176\179\144\176F$unit@@\144@\002\005\245\225\000\000\252@\002\005\245\225\000\000\253@\002\005\245\225\000\000\254@\004\029@\160\160\176\001\004\148(open_box@\192\176\193@\176\179\144\004\019@\144@\002\005\245\225\000\000\247\176\179\144\004\017@\144@\002\005\245\225\000\000\248@\002\005\245\225\000\000\249@\004,@\160\160\176\001\004\149,pp_close_box@\192\176\193@\176\179\004(@\144@\002\005\245\225\000\000\242\176\193@\176\179\144\004!@\144@\002\005\245\225\000\000\243\176\179\144\004%@\144@\002\005\245\225\000\000\244@\002\005\245\225\000\000\245@\002\005\245\225\000\000\246@\004@@\160\160\176\001\004\150)close_box@\192\176\193@\176\179\144\0040@\144@\002\005\245\225\000\000\239\176\179\144\0044@\144@\002\005\245\225\000\000\240@\002\005\245\225\000\000\241@\004O@\160\160\176\001\004\151,pp_open_hbox@\192\176\193@\176\179\004K@\144@\002\005\245\225\000\000\234\176\193@\176\179\144\004D@\144@\002\005\245\225\000\000\235\176\179\144\004H@\144@\002\005\245\225\000\000\236@\002\005\245\225\000\000\237@\002\005\245\225\000\000\238@\004c@\160\160\176\001\004\152)open_hbox@\192\176\193@\176\179\144\004S@\144@\002\005\245\225\000\000\231\176\179\144\004W@\144@\002\005\245\225\000\000\232@\002\005\245\225\000\000\233@\004r@\160\160\176\001\004\153,pp_open_vbox@\192\176\193@\176\179\004n@\144@\002\005\245\225\000\000\226\176\193@\176\179\144\004m@\144@\002\005\245\225\000\000\227\176\179\144\004k@\144@\002\005\245\225\000\000\228@\002\005\245\225\000\000\229@\002\005\245\225\000\000\230@\004\134@\160\160\176\001\004\154)open_vbox@\192\176\193@\176\179\144\004|@\144@\002\005\245\225\000\000\223\176\179\144\004z@\144@\002\005\245\225\000\000\224@\002\005\245\225\000\000\225@\004\149@\160\160\176\001\004\155-pp_open_hvbox@\192\176\193@\176\179\004\145@\144@\002\005\245\225\000\000\218\176\193@\176\179\144\004\144@\144@\002\005\245\225\000\000\219\176\179\144\004\142@\144@\002\005\245\225\000\000\220@\002\005\245\225\000\000\221@\002\005\245\225\000\000\222@\004\169@\160\160\176\001\004\156*open_hvbox@\192\176\193@\176\179\144\004\159@\144@\002\005\245\225\000\000\215\176\179\144\004\157@\144@\002\005\245\225\000\000\216@\002\005\245\225\000\000\217@\004\184@\160\160\176\001\004\157.pp_open_hovbox@\192\176\193@\176\179\004\180@\144@\002\005\245\225\000\000\210\176\193@\176\179\144\004\179@\144@\002\005\245\225\000\000\211\176\179\144\004\177@\144@\002\005\245\225\000\000\212@\002\005\245\225\000\000\213@\002\005\245\225\000\000\214@\004\204@\160\160\176\001\004\158+open_hovbox@\192\176\193@\176\179\144\004\194@\144@\002\005\245\225\000\000\207\176\179\144\004\192@\144@\002\005\245\225\000\000\208@\002\005\245\225\000\000\209@\004\219@\160\160\176\001\004\159/pp_print_string@\192\176\193@\176\179\004\215@\144@\002\005\245\225\000\000\202\176\193@\176\179\144\176O&string@@\144@\002\005\245\225\000\000\203\176\179\144\004\214@\144@\002\005\245\225\000\000\204@\002\005\245\225\000\000\205@\002\005\245\225\000\000\206@\004\241@\160\160\176\001\004\160,print_string@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\199\176\179\144\004\229@\144@\002\005\245\225\000\000\200@\002\005\245\225\000\000\201@\005\001\000@\160\160\176\001\004\161+pp_print_as@\192\176\193@\176\179\004\252@\144@\002\005\245\225\000\000\192\176\193@\176\179\144\004\251@\144@\002\005\245\225\000\000\193\176\193@\176\179\144\004+@\144@\002\005\245\225\000\000\194\176\179\144\004\255@\144@\002\005\245\225\000\000\195@\002\005\245\225\000\000\196@\002\005\245\225\000\000\197@\002\005\245\225\000\000\198@\005\001\026@\160\160\176\001\004\162(print_as@\192\176\193@\176\179\144\005\001\016@\144@\002\005\245\225\000\000\187\176\193@\176\179\144\004@@\144@\002\005\245\225\000\000\188\176\179\144\005\001\020@\144@\002\005\245\225\000\000\189@\002\005\245\225\000\000\190@\002\005\245\225\000\000\191@\005\001/@\160\160\176\001\004\163,pp_print_int@\192\176\193@\176\179\005\001+@\144@\002\005\245\225\000\000\182\176\193@\176\179\144\005\001*@\144@\002\005\245\225\000\000\183\176\179\144\005\001(@\144@\002\005\245\225\000\000\184@\002\005\245\225\000\000\185@\002\005\245\225\000\000\186@\005\001C@\160\160\176\001\004\164)print_int@\192\176\193@\176\179\144\005\0019@\144@\002\005\245\225\000\000\179\176\179\144\005\0017@\144@\002\005\245\225\000\000\180@\002\005\245\225\000\000\181@\005\001R@\160\160\176\001\004\165.pp_print_float@\192\176\193@\176\179\005\001N@\144@\002\005\245\225\000\000\174\176\193@\176\179\144\176D%float@@\144@\002\005\245\225\000\000\175\176\179\144\005\001M@\144@\002\005\245\225\000\000\176@\002\005\245\225\000\000\177@\002\005\245\225\000\000\178@\005\001h@\160\160\176\001\004\166+print_float@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\171\176\179\144\005\001\\@\144@\002\005\245\225\000\000\172@\002\005\245\225\000\000\173@\005\001w@\160\160\176\001\004\167-pp_print_char@\192\176\193@\176\179\005\001s@\144@\002\005\245\225\000\000\166\176\193@\176\179\144\176B$char@@\144@\002\005\245\225\000\000\167\176\179\144\005\001r@\144@\002\005\245\225\000\000\168@\002\005\245\225\000\000\169@\002\005\245\225\000\000\170@\005\001\141@\160\160\176\001\004\168*print_char@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\163\176\179\144\005\001\129@\144@\002\005\245\225\000\000\164@\002\005\245\225\000\000\165@\005\001\156@\160\160\176\001\004\169-pp_print_bool@\192\176\193@\176\179\005\001\152@\144@\002\005\245\225\000\000\158\176\193@\176\179\144\176E$bool@@\144@\002\005\245\225\000\000\159\176\179\144\005\001\151@\144@\002\005\245\225\000\000\160@\002\005\245\225\000\000\161@\002\005\245\225\000\000\162@\005\001\178@\160\160\176\001\004\170*print_bool@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\155\176\179\144\005\001\166@\144@\002\005\245\225\000\000\156@\002\005\245\225\000\000\157@\005\001\193@\160\160\176\001\004\171.pp_print_space@\192\176\193@\176\179\005\001\189@\144@\002\005\245\225\000\000\150\176\193@\176\179\144\005\001\182@\144@\002\005\245\225\000\000\151\176\179\144\005\001\186@\144@\002\005\245\225\000\000\152@\002\005\245\225\000\000\153@\002\005\245\225\000\000\154@\005\001\213@\160\160\176\001\004\172+print_space@\192\176\193@\176\179\144\005\001\197@\144@\002\005\245\225\000\000\147\176\179\144\005\001\201@\144@\002\005\245\225\000\000\148@\002\005\245\225\000\000\149@\005\001\228@\160\160\176\001\004\173,pp_print_cut@\192\176\193@\176\179\005\001\224@\144@\002\005\245\225\000\000\142\176\193@\176\179\144\005\001\217@\144@\002\005\245\225\000\000\143\176\179\144\005\001\221@\144@\002\005\245\225\000\000\144@\002\005\245\225\000\000\145@\002\005\245\225\000\000\146@\005\001\248@\160\160\176\001\004\174)print_cut@\192\176\193@\176\179\144\005\001\232@\144@\002\005\245\225\000\000\139\176\179\144\005\001\236@\144@\002\005\245\225\000\000\140@\002\005\245\225\000\000\141@\005\002\007@\160\160\176\001\004\175.pp_print_break@\192\176\193@\176\179\005\002\003@\144@\002\005\245\225\000\000\132\176\193@\176\179\144\005\002\002@\144@\002\005\245\225\000\000\133\176\193@\176\179\144\005\002\b@\144@\002\005\245\225\000\000\134\176\179\144\005\002\006@\144@\002\005\245\225\000\000\135@\002\005\245\225\000\000\136@\002\005\245\225\000\000\137@\002\005\245\225\000\000\138@\005\002!@\160\160\176\001\004\176+print_break@\192\176\193@\176\179\144\005\002\023@\144@\002\005\245\225\000\001\255\127\176\193@\176\179\144\005\002\029@\144@\002\005\245\225\000\000\128\176\179\144\005\002\027@\144@\002\005\245\225\000\000\129@\002\005\245\225\000\000\130@\002\005\245\225\000\000\131@\005\0026@\160\160\176\001\004\1770pp_force_newline@\192\176\193@\176\179\005\0022@\144@\002\005\245\225\000\001\255z\176\193@\176\179\144\005\002+@\144@\002\005\245\225\000\001\255{\176\179\144\005\002/@\144@\002\005\245\225\000\001\255|@\002\005\245\225\000\001\255}@\002\005\245\225\000\001\255~@\005\002J@\160\160\176\001\004\178-force_newline@\192\176\193@\176\179\144\005\002:@\144@\002\005\245\225\000\001\255w\176\179\144\005\002>@\144@\002\005\245\225\000\001\255x@\002\005\245\225\000\001\255y@\005\002Y@\160\160\176\001\004\1793pp_print_if_newline@\192\176\193@\176\179\005\002U@\144@\002\005\245\225\000\001\255r\176\193@\176\179\144\005\002N@\144@\002\005\245\225\000\001\255s\176\179\144\005\002R@\144@\002\005\245\225\000\001\255t@\002\005\245\225\000\001\255u@\002\005\245\225\000\001\255v@\005\002m@\160\160\176\001\004\1800print_if_newline@\192\176\193@\176\179\144\005\002]@\144@\002\005\245\225\000\001\255o\176\179\144\005\002a@\144@\002\005\245\225\000\001\255p@\002\005\245\225\000\001\255q@\005\002|@\160\160\176\001\004\181.pp_print_flush@\192\176\193@\176\179\005\002x@\144@\002\005\245\225\000\001\255j\176\193@\176\179\144\005\002q@\144@\002\005\245\225\000\001\255k\176\179\144\005\002u@\144@\002\005\245\225\000\001\255l@\002\005\245\225\000\001\255m@\002\005\245\225\000\001\255n@\005\002\144@\160\160\176\001\004\182+print_flush@\192\176\193@\176\179\144\005\002\128@\144@\002\005\245\225\000\001\255g\176\179\144\005\002\132@\144@\002\005\245\225\000\001\255h@\002\005\245\225\000\001\255i@\005\002\159@\160\160\176\001\004\1830pp_print_newline@\192\176\193@\176\179\005\002\155@\144@\002\005\245\225\000\001\255b\176\193@\176\179\144\005\002\148@\144@\002\005\245\225\000\001\255c\176\179\144\005\002\152@\144@\002\005\245\225\000\001\255d@\002\005\245\225\000\001\255e@\002\005\245\225\000\001\255f@\005\002\179@\160\160\176\001\004\184-print_newline@\192\176\193@\176\179\144\005\002\163@\144@\002\005\245\225\000\001\255_\176\179\144\005\002\167@\144@\002\005\245\225\000\001\255`@\002\005\245\225\000\001\255a@\005\002\194@\160\160\176\001\004\185-pp_set_margin@\192\176\193@\176\179\005\002\190@\144@\002\005\245\225\000\001\255Z\176\193@\176\179\144\005\002\189@\144@\002\005\245\225\000\001\255[\176\179\144\005\002\187@\144@\002\005\245\225\000\001\255\\@\002\005\245\225\000\001\255]@\002\005\245\225\000\001\255^@\005\002\214@\160\160\176\001\004\186*set_margin@\192\176\193@\176\179\144\005\002\204@\144@\002\005\245\225\000\001\255W\176\179\144\005\002\202@\144@\002\005\245\225\000\001\255X@\002\005\245\225\000\001\255Y@\005\002\229@\160\160\176\001\004\187-pp_get_margin@\192\176\193@\176\179\005\002\225@\144@\002\005\245\225\000\001\255R\176\193@\176\179\144\005\002\218@\144@\002\005\245\225\000\001\255S\176\179\144\005\002\228@\144@\002\005\245\225\000\001\255T@\002\005\245\225\000\001\255U@\002\005\245\225\000\001\255V@\005\002\249@\160\160\176\001\004\188*get_margin@\192\176\193@\176\179\144\005\002\233@\144@\002\005\245\225\000\001\255O\176\179\144\005\002\243@\144@\002\005\245\225\000\001\255P@\002\005\245\225\000\001\255Q@\005\003\b@\160\160\176\001\004\1891pp_set_max_indent@\192\176\193@\176\179\005\003\004@\144@\002\005\245\225\000\001\255J\176\193@\176\179\144\005\003\003@\144@\002\005\245\225\000\001\255K\176\179\144\005\003\001@\144@\002\005\245\225\000\001\255L@\002\005\245\225\000\001\255M@\002\005\245\225\000\001\255N@\005\003\028@\160\160\176\001\004\190.set_max_indent@\192\176\193@\176\179\144\005\003\018@\144@\002\005\245\225\000\001\255G\176\179\144\005\003\016@\144@\002\005\245\225\000\001\255H@\002\005\245\225\000\001\255I@\005\003+@\160\160\176\001\004\1911pp_get_max_indent@\192\176\193@\176\179\005\003'@\144@\002\005\245\225\000\001\255B\176\193@\176\179\144\005\003 @\144@\002\005\245\225\000\001\255C\176\179\144\005\003*@\144@\002\005\245\225\000\001\255D@\002\005\245\225\000\001\255E@\002\005\245\225\000\001\255F@\005\003?@\160\160\176\001\004\192.get_max_indent@\192\176\193@\176\179\144\005\003/@\144@\002\005\245\225\000\001\255?\176\179\144\005\0039@\144@\002\005\245\225\000\001\255@@\002\005\245\225\000\001\255A@\005\003N@\160\160\176\001\004\1930pp_set_max_boxes@\192\176\193@\176\179\005\003J@\144@\002\005\245\225\000\001\255:\176\193@\176\179\144\005\003I@\144@\002\005\245\225\000\001\255;\176\179\144\005\003G@\144@\002\005\245\225\000\001\255<@\002\005\245\225\000\001\255=@\002\005\245\225\000\001\255>@\005\003b@\160\160\176\001\004\194-set_max_boxes@\192\176\193@\176\179\144\005\003X@\144@\002\005\245\225\000\001\2557\176\179\144\005\003V@\144@\002\005\245\225\000\001\2558@\002\005\245\225\000\001\2559@\005\003q@\160\160\176\001\004\1950pp_get_max_boxes@\192\176\193@\176\179\005\003m@\144@\002\005\245\225\000\001\2552\176\193@\176\179\144\005\003f@\144@\002\005\245\225\000\001\2553\176\179\144\005\003p@\144@\002\005\245\225\000\001\2554@\002\005\245\225\000\001\2555@\002\005\245\225\000\001\2556@\005\003\133@\160\160\176\001\004\196-get_max_boxes@\192\176\193@\176\179\144\005\003u@\144@\002\005\245\225\000\001\255/\176\179\144\005\003\127@\144@\002\005\245\225\000\001\2550@\002\005\245\225\000\001\2551@\005\003\148@\160\160\176\001\004\1971pp_over_max_boxes@\192\176\193@\176\179\005\003\144@\144@\002\005\245\225\000\001\255*\176\193@\176\179\144\005\003\137@\144@\002\005\245\225\000\001\255+\176\179\144\005\001\252@\144@\002\005\245\225\000\001\255,@\002\005\245\225\000\001\255-@\002\005\245\225\000\001\255.@\005\003\168@\160\160\176\001\004\198.over_max_boxes@\192\176\193@\176\179\144\005\003\152@\144@\002\005\245\225\000\001\255'\176\179\144\005\002\011@\144@\002\005\245\225\000\001\255(@\002\005\245\225\000\001\255)@\005\003\183@\160\160\176\001\004\199,pp_open_tbox@\192\176\193@\176\179\005\003\179@\144@\002\005\245\225\000\001\255\"\176\193@\176\179\144\005\003\172@\144@\002\005\245\225\000\001\255#\176\179\144\005\003\176@\144@\002\005\245\225\000\001\255$@\002\005\245\225\000\001\255%@\002\005\245\225\000\001\255&@\005\003\203@\160\160\176\001\004\200)open_tbox@\192\176\193@\176\179\144\005\003\187@\144@\002\005\245\225\000\001\255\031\176\179\144\005\003\191@\144@\002\005\245\225\000\001\255 @\002\005\245\225\000\001\255!@\005\003\218@\160\160\176\001\004\201-pp_close_tbox@\192\176\193@\176\179\005\003\214@\144@\002\005\245\225\000\001\255\026\176\193@\176\179\144\005\003\207@\144@\002\005\245\225\000\001\255\027\176\179\144\005\003\211@\144@\002\005\245\225\000\001\255\028@\002\005\245\225\000\001\255\029@\002\005\245\225\000\001\255\030@\005\003\238@\160\160\176\001\004\202*close_tbox@\192\176\193@\176\179\144\005\003\222@\144@\002\005\245\225\000\001\255\023\176\179\144\005\003\226@\144@\002\005\245\225\000\001\255\024@\002\005\245\225\000\001\255\025@\005\003\253@\160\160\176\001\004\203*pp_set_tab@\192\176\193@\176\179\005\003\249@\144@\002\005\245\225\000\001\255\018\176\193@\176\179\144\005\003\242@\144@\002\005\245\225\000\001\255\019\176\179\144\005\003\246@\144@\002\005\245\225\000\001\255\020@\002\005\245\225\000\001\255\021@\002\005\245\225\000\001\255\022@\005\004\017@\160\160\176\001\004\204'set_tab@\192\176\193@\176\179\144\005\004\001@\144@\002\005\245\225\000\001\255\015\176\179\144\005\004\005@\144@\002\005\245\225\000\001\255\016@\002\005\245\225\000\001\255\017@\005\004 @\160\160\176\001\004\205,pp_print_tab@\192\176\193@\176\179\005\004\028@\144@\002\005\245\225\000\001\255\n\176\193@\176\179\144\005\004\021@\144@\002\005\245\225\000\001\255\011\176\179\144\005\004\025@\144@\002\005\245\225\000\001\255\012@\002\005\245\225\000\001\255\r@\002\005\245\225\000\001\255\014@\005\0044@\160\160\176\001\004\206)print_tab@\192\176\193@\176\179\144\005\004$@\144@\002\005\245\225\000\001\255\007\176\179\144\005\004(@\144@\002\005\245\225\000\001\255\b@\002\005\245\225\000\001\255\t@\005\004C@\160\160\176\001\004\207/pp_print_tbreak@\192\176\193@\176\179\005\004?@\144@\002\005\245\225\000\001\255\000\176\193@\176\179\144\005\004>@\144@\002\005\245\225\000\001\255\001\176\193@\176\179\144\005\004D@\144@\002\005\245\225\000\001\255\002\176\179\144\005\004B@\144@\002\005\245\225\000\001\255\003@\002\005\245\225\000\001\255\004@\002\005\245\225\000\001\255\005@\002\005\245\225\000\001\255\006@\005\004]@\160\160\176\001\004\208,print_tbreak@\192\176\193@\176\179\144\005\004S@\144@\002\005\245\225\000\001\254\251\176\193@\176\179\144\005\004Y@\144@\002\005\245\225\000\001\254\252\176\179\144\005\004W@\144@\002\005\245\225\000\001\254\253@\002\005\245\225\000\001\254\254@\002\005\245\225\000\001\254\255@\005\004r@\160\160\176\001\004\2094pp_set_ellipsis_text@\192\176\193@\176\179\005\004n@\144@\002\005\245\225\000\001\254\246\176\193@\176\179\144\005\003\151@\144@\002\005\245\225\000\001\254\247\176\179\144\005\004k@\144@\002\005\245\225\000\001\254\248@\002\005\245\225\000\001\254\249@\002\005\245\225\000\001\254\250@\005\004\134@\160\160\176\001\004\2101set_ellipsis_text@\192\176\193@\176\179\144\005\003\166@\144@\002\005\245\225\000\001\254\243\176\179\144\005\004z@\144@\002\005\245\225\000\001\254\244@\002\005\245\225\000\001\254\245@\005\004\149@\160\160\176\001\004\2114pp_get_ellipsis_text@\192\176\193@\176\179\005\004\145@\144@\002\005\245\225\000\001\254\238\176\193@\176\179\144\005\004\138@\144@\002\005\245\225\000\001\254\239\176\179\144\005\003\190@\144@\002\005\245\225\000\001\254\240@\002\005\245\225\000\001\254\241@\002\005\245\225\000\001\254\242@\005\004\169@\160\160\176\001\004\2121get_ellipsis_text@\192\176\193@\176\179\144\005\004\153@\144@\002\005\245\225\000\001\254\235\176\179\144\005\003\205@\144@\002\005\245\225\000\001\254\236@\002\005\245\225\000\001\254\237@\005\004\184@\160\177\176\001\004\213#tag@\b\000\000,\000@@@A\144\176\179\144\005\003\215@\144@\002\005\245\225\000\001\254\234@@\005\004\194@@\005\004\191A\160\160\176\001\004\214+pp_open_tag@\192\176\193@\176\179\005\004\190@\144@\002\005\245\225\000\001\254\229\176\193@\176\179\144\005\003\231@\144@\002\005\245\225\000\001\254\230\176\179\144\005\004\187@\144@\002\005\245\225\000\001\254\231@\002\005\245\225\000\001\254\232@\002\005\245\225\000\001\254\233@\005\004\214@\160\160\176\001\004\215(open_tag@\192\176\193@\176\179\144\004&@\144@\002\005\245\225\000\001\254\226\176\179\144\005\004\202@\144@\002\005\245\225\000\001\254\227@\002\005\245\225\000\001\254\228@\005\004\229@\160\160\176\001\004\216,pp_close_tag@\192\176\193@\176\179\005\004\225@\144@\002\005\245\225\000\001\254\221\176\193@\176\179\144\005\004\218@\144@\002\005\245\225\000\001\254\222\176\179\144\005\004\222@\144@\002\005\245\225\000\001\254\223@\002\005\245\225\000\001\254\224@\002\005\245\225\000\001\254\225@\005\004\249@\160\160\176\001\004\217)close_tag@\192\176\193@\176\179\144\005\004\233@\144@\002\005\245\225\000\001\254\218\176\179\144\005\004\237@\144@\002\005\245\225\000\001\254\219@\002\005\245\225\000\001\254\220@\005\005\b@\160\160\176\001\004\218+pp_set_tags@\192\176\193@\176\179\005\005\004@\144@\002\005\245\225\000\001\254\213\176\193@\176\179\144\005\003l@\144@\002\005\245\225\000\001\254\214\176\179\144\005\005\001@\144@\002\005\245\225\000\001\254\215@\002\005\245\225\000\001\254\216@\002\005\245\225\000\001\254\217@\005\005\028@\160\160\176\001\004\219(set_tags@\192\176\193@\176\179\144\005\003{@\144@\002\005\245\225\000\001\254\210\176\179\144\005\005\016@\144@\002\005\245\225\000\001\254\211@\002\005\245\225\000\001\254\212@\005\005+@\160\160\176\001\004\2201pp_set_print_tags@\192\176\193@\176\179\005\005'@\144@\002\005\245\225\000\001\254\205\176\193@\176\179\144\005\003\143@\144@\002\005\245\225\000\001\254\206\176\179\144\005\005$@\144@\002\005\245\225\000\001\254\207@\002\005\245\225\000\001\254\208@\002\005\245\225\000\001\254\209@\005\005?@\160\160\176\001\004\221.set_print_tags@\192\176\193@\176\179\144\005\003\158@\144@\002\005\245\225\000\001\254\202\176\179\144\005\0053@\144@\002\005\245\225\000\001\254\203@\002\005\245\225\000\001\254\204@\005\005N@\160\160\176\001\004\2220pp_set_mark_tags@\192\176\193@\176\179\005\005J@\144@\002\005\245\225\000\001\254\197\176\193@\176\179\144\005\003\178@\144@\002\005\245\225\000\001\254\198\176\179\144\005\005G@\144@\002\005\245\225\000\001\254\199@\002\005\245\225\000\001\254\200@\002\005\245\225\000\001\254\201@\005\005b@\160\160\176\001\004\223-set_mark_tags@\192\176\193@\176\179\144\005\003\193@\144@\002\005\245\225\000\001\254\194\176\179\144\005\005V@\144@\002\005\245\225\000\001\254\195@\002\005\245\225\000\001\254\196@\005\005q@\160\160\176\001\004\2241pp_get_print_tags@\192\176\193@\176\179\005\005m@\144@\002\005\245\225\000\001\254\189\176\193@\176\179\144\005\005f@\144@\002\005\245\225\000\001\254\190\176\179\144\005\003\217@\144@\002\005\245\225\000\001\254\191@\002\005\245\225\000\001\254\192@\002\005\245\225\000\001\254\193@\005\005\133@\160\160\176\001\004\225.get_print_tags@\192\176\193@\176\179\144\005\005u@\144@\002\005\245\225\000\001\254\186\176\179\144\005\003\232@\144@\002\005\245\225\000\001\254\187@\002\005\245\225\000\001\254\188@\005\005\148@\160\160\176\001\004\2260pp_get_mark_tags@\192\176\193@\176\179\005\005\144@\144@\002\005\245\225\000\001\254\181\176\193@\176\179\144\005\005\137@\144@\002\005\245\225\000\001\254\182\176\179\144\005\003\252@\144@\002\005\245\225\000\001\254\183@\002\005\245\225\000\001\254\184@\002\005\245\225\000\001\254\185@\005\005\168@\160\160\176\001\004\227-get_mark_tags@\192\176\193@\176\179\144\005\005\152@\144@\002\005\245\225\000\001\254\178\176\179\144\005\004\011@\144@\002\005\245\225\000\001\254\179@\002\005\245\225\000\001\254\180@\005\005\183@\160\160\176\001\004\228set_formatter_output_functions@\192\176\193@\176\193@\176\179\144\005\0056@\144@\002\005\245\225\000\001\254\142\176\193@\176\179\144\005\006\018@\144@\002\005\245\225\000\001\254\143\176\193@\176\179\144\005\006\024@\144@\002\005\245\225\000\001\254\144\176\179\144\005\006\022@\144@\002\005\245\225\000\001\254\145@\002\005\245\225\000\001\254\146@\002\005\245\225\000\001\254\147@\002\005\245\225\000\001\254\148\176\193@\176\193@\176\179\144\005\006\030@\144@\002\005\245\225\000\001\254\149\176\179\144\005\006\"@\144@\002\005\245\225\000\001\254\150@\002\005\245\225\000\001\254\151\176\179\144\005\006&@\144@\002\005\245\225\000\001\254\152@\002\005\245\225\000\001\254\153@\002\005\245\225\000\001\254\154@\005\006A@\160\160\176\001\004\232\t!pp_get_formatter_output_functions@\192\176\193@\176\179\005\006=@\144@\002\005\245\225\000\001\254\127\176\193@\176\179\144\005\0066@\144@\002\005\245\225\000\001\254\128\176\146\160\176\193@\176\179\144\005\005o@\144@\002\005\245\225\000\001\254\132\176\193@\176\179\144\005\006K@\144@\002\005\245\225\000\001\254\133\176\193@\176\179\144\005\006Q@\144@\002\005\245\225\000\001\254\134\176\179\144\005\006O@\144@\002\005\245\225\000\001\254\135@\002\005\245\225\000\001\254\136@\002\005\245\225\000\001\254\137@\002\005\245\225\000\001\254\138\160\176\193@\176\179\144\005\006V@\144@\002\005\245\225\000\001\254\129\176\179\144\005\006Z@\144@\002\005\245\225\000\001\254\130@\002\005\245\225\000\001\254\131@\002\005\245\225\000\001\254\139@\002\005\245\225\000\001\254\140@\002\005\245\225\000\001\254\141@\005\006u@\160\160\176\001\004\233>get_formatter_output_functions@\192\176\193@\176\179\144\005\006e@\144@\002\005\245\225\000\001\254r\176\146\160\176\193@\176\179\144\005\005\158@\144@\002\005\245\225\000\001\254v\176\193@\176\179\144\005\006z@\144@\002\005\245\225\000\001\254w\176\193@\176\179\144\005\006\128@\144@\002\005\245\225\000\001\254x\176\179\144\005\006~@\144@\002\005\245\225\000\001\254y@\002\005\245\225\000\001\254z@\002\005\245\225\000\001\254{@\002\005\245\225\000\001\254|\160\176\193@\176\179\144\005\006\133@\144@\002\005\245\225\000\001\254s\176\179\144\005\006\137@\144@\002\005\245\225\000\001\254t@\002\005\245\225\000\001\254u@\002\005\245\225\000\001\254}@\002\005\245\225\000\001\254~@\005\006\164@\160\177\176\001\004\2347formatter_out_functions@\b\000\000,\000@@\160\160\208\176\001\004C*out_string@@\176\193@\176\179\144\005\005\201@\144@\002\005\245\225\000\001\254k\176\193@\176\179\144\005\006\165@\144@\002\005\245\225\000\001\254l\176\193@\176\179\144\005\006\171@\144@\002\005\245\225\000\001\254m\176\179\144\005\006\169@\144@\002\005\245\225\000\001\254n@\002\005\245\225\000\001\254o@\002\005\245\225\000\001\254p@\002\005\245\225\000\001\254q\005\006\196@\160\208\176\001\004D)out_flush@@\176\193@\176\179\144\005\006\179@\144@\002\005\245\225\000\001\254h\176\179\144\005\006\183@\144@\002\005\245\225\000\001\254i@\002\005\245\225\000\001\254j\005\006\210@\160\208\176\001\004E+out_newline@@\176\193@\176\179\144\005\006\193@\144@\002\005\245\225\000\001\254e\176\179\144\005\006\197@\144@\002\005\245\225\000\001\254f@\002\005\245\225\000\001\254g\005\006\224@\160\208\176\001\004F*out_spaces@@\176\193@\176\179\144\005\006\213@\144@\002\005\245\225\000\001\254b\176\179\144\005\006\211@\144@\002\005\245\225\000\001\254c@\002\005\245\225\000\001\254d\005\006\238@\160\208\176\001\004G*out_indent@@\176\193@\176\179\144\005\006\227@\144@\002\005\245\225\000\001\254_\176\179\144\005\006\225@\144@\002\005\245\225\000\001\254`@\002\005\245\225\000\001\254a\005\006\252@@@A@@@\005\006\252@@\005\006\249A\160\160\176\001\004\235>pp_set_formatter_out_functions@\192\176\193@\176\179\005\006\248@\144@\002\005\245\225\000\001\254Z\176\193@\176\179\144\004e@\144@\002\005\245\225\000\001\254[\176\179\144\005\006\245@\144@\002\005\245\225\000\001\254\\@\002\005\245\225\000\001\254]@\002\005\245\225\000\001\254^@\005\007\016@\160\160\176\001\004\236;set_formatter_out_functions@\192\176\193@\176\179\004\015@\144@\002\005\245\225\000\001\254W\176\179\144\005\007\003@\144@\002\005\245\225\000\001\254X@\002\005\245\225\000\001\254Y@\005\007\030@\160\160\176\001\004\237>pp_get_formatter_out_functions@\192\176\193@\176\179\005\007\026@\144@\002\005\245\225\000\001\254R\176\193@\176\179\144\005\007\019@\144@\002\005\245\225\000\001\254S\176\179\004&@\144@\002\005\245\225\000\001\254T@\002\005\245\225\000\001\254U@\002\005\245\225\000\001\254V@\005\0071@\160\160\176\001\004\238;get_formatter_out_functions@\192\176\193@\176\179\144\005\007!@\144@\002\005\245\225\000\001\254O\176\179\0044@\144@\002\005\245\225\000\001\254P@\002\005\245\225\000\001\254Q@\005\007?@\160\177\176\001\004\2397formatter_tag_functions@\b\000\000,\000@@\160\160\208\176\001\004M-mark_open_tag@@\176\193@\176\179\005\002n@\144@\002\005\245\225\000\001\254L\176\179\144\005\006g@\144@\002\005\245\225\000\001\254M@\002\005\245\225\000\001\254N\005\007R@\160\208\176\001\004N.mark_close_tag@@\176\193@\176\179\005\002{@\144@\002\005\245\225\000\001\254I\176\179\144\005\006t@\144@\002\005\245\225\000\001\254J@\002\005\245\225\000\001\254K\005\007_@\160\208\176\001\004O.print_open_tag@@\176\193@\176\179\005\002\136@\144@\002\005\245\225\000\001\254F\176\179\144\005\007Q@\144@\002\005\245\225\000\001\254G@\002\005\245\225\000\001\254H\005\007l@\160\208\176\001\004P/print_close_tag@@\176\193@\176\179\005\002\149@\144@\002\005\245\225\000\001\254C\176\179\144\005\007^@\144@\002\005\245\225\000\001\254D@\002\005\245\225\000\001\254E\005\007y@@@A@@@\005\007y@@\005\007vA\160\160\176\001\004\240>pp_set_formatter_tag_functions@\192\176\193@\176\179\005\007u@\144@\002\005\245\225\000\001\254>\176\193@\176\179\144\004G@\144@\002\005\245\225\000\001\254?\176\179\144\005\007r@\144@\002\005\245\225\000\001\254@@\002\005\245\225\000\001\254A@\002\005\245\225\000\001\254B@\005\007\141@\160\160\176\001\004\241;set_formatter_tag_functions@\192\176\193@\176\179\004\015@\144@\002\005\245\225\000\001\254;\176\179\144\005\007\128@\144@\002\005\245\225\000\001\254<@\002\005\245\225\000\001\254=@\005\007\155@\160\160\176\001\004\242>pp_get_formatter_tag_functions@\192\176\193@\176\179\005\007\151@\144@\002\005\245\225\000\001\2546\176\193@\176\179\144\005\007\144@\144@\002\005\245\225\000\001\2547\176\179\004&@\144@\002\005\245\225\000\001\2548@\002\005\245\225\000\001\2549@\002\005\245\225\000\001\254:@\005\007\174@\160\160\176\001\004\243;get_formatter_tag_functions@\192\176\193@\176\179\144\005\007\158@\144@\002\005\245\225\000\001\2543\176\179\0044@\144@\002\005\245\225\000\001\2544@\002\005\245\225\000\001\2545@\005\007\188@\160\160\176\001\004\2448formatter_of_out_channel@\192\176\193@\176\179\177\144\176@*PervasivesA+out_channel\000\255@\144@\002\005\245\225\000\001\2540\176\179\005\007\192@\144@\002\005\245\225\000\001\2541@\002\005\245\225\000\001\2542@\005\007\206@\160\160\176\001\004\245-std_formatter@\192\176\179\005\007\200@\144@\002\005\245\225\000\001\254/@\005\007\214@\160\160\176\001\004\246-err_formatter@\192\176\179\005\007\208@\144@\002\005\245\225\000\001\254.@\005\007\222@\160\160\176\001\004\2473formatter_of_buffer@\192\176\193@\176\179\177\144\176@&BufferA!t\000\255@\144@\002\005\245\225\000\001\254+\176\179\005\007\226@\144@\002\005\245\225\000\001\254,@\002\005\245\225\000\001\254-@\005\007\240@\160\160\176\001\004\248&stdbuf@\192\176\179\177\144\176@&BufferA!t\000\255@\144@\002\005\245\225\000\001\254*@\005\007\253@\160\160\176\001\004\249-str_formatter@\192\176\179\005\007\247@\144@\002\005\245\225\000\001\254)@\005\b\005@\160\160\176\001\004\2503flush_str_formatter@\192\176\193@\176\179\144\005\007\245@\144@\002\005\245\225\000\001\254&\176\179\144\005\007)@\144@\002\005\245\225\000\001\254'@\002\005\245\225\000\001\254(@\005\b\020@\160\160\176\001\004\251.make_formatter@\192\176\193@\176\193@\176\179\144\005\0076@\144@\002\005\245\225\000\001\254\025\176\193@\176\179\144\005\b\018@\144@\002\005\245\225\000\001\254\026\176\193@\176\179\144\005\b\024@\144@\002\005\245\225\000\001\254\027\176\179\144\005\b\022@\144@\002\005\245\225\000\001\254\028@\002\005\245\225\000\001\254\029@\002\005\245\225\000\001\254\030@\002\005\245\225\000\001\254\031\176\193@\176\193@\176\179\144\005\b\030@\144@\002\005\245\225\000\001\254 \176\179\144\005\b\"@\144@\002\005\245\225\000\001\254!@\002\005\245\225\000\001\254\"\176\179\005\b2@\144@\002\005\245\225\000\001\254#@\002\005\245\225\000\001\254$@\002\005\245\225\000\001\254%@\005\b@@\160\160\176\001\004\252:formatter_of_out_functions@\192\176\193@\176\179\005\001?@\144@\002\005\245\225\000\001\254\022\176\179\005\b?@\144@\002\005\245\225\000\001\254\023@\002\005\245\225\000\001\254\024@\005\bM@\160\177\176\001\004\2534symbolic_output_item@\b\000\000,\000@@\145\160\208\176\001\004_,Output_flush@\144@@\005\bX@\160\208\176\001\004`.Output_newline@\144@@\005\b]@\160\208\176\001\004a-Output_string@\144\160\176\179\144\005\007|@\144@\002\005\245\225\000\001\254\021@@\005\bg@\160\208\176\001\004b-Output_spaces@\144\160\176\179\144\005\b\\@\144@\002\005\245\225\000\001\254\020@@\005\bq@\160\208\176\001\004c-Output_indent@\144\160\176\179\144\005\bf@\144@\002\005\245\225\000\001\254\019@@\005\b{@@A@@@\005\b{@@\005\bxA\160\177\176\001\004\2546symbolic_output_buffer@\b\000\000,\000@@@A@@@\005\b\128@@\005\b}A\160\160\176\001\004\255;make_symbolic_output_buffer@\192\176\193@\176\179\144\005\bp@\144@\002\005\245\225\000\001\254\016\176\179\144\004\017@\144@\002\005\245\225\000\001\254\017@\002\005\245\225\000\001\254\018@\005\b\143@\160\160\176\001\005\000\160\176\193@\176\179\144\005\012\031@\144@\002\005\245\225\000\001\2539\176\179\144\005\012\029@\144@\002\005\245\225\000\001\253:@\002\005\245\225\000\001\253;@\002\005\245\225\000\001\253I@\002\005\245\225\000\001\253J@\002\005\245\225\000\001\253K@\005\0128\160\160\1600ocaml.deprecated\005\012<\144\160\160\160\176\145\162\t2Use Format.pp_get_formatter_out_functions instead.@\005\012D@@\005\012D@@@\160\160&Format\1440\206\172wan\183\020\0175:\154\1597\144\241w\160\160%Uchar\1440\172\0161\143? {|[Symbol.for("name")]|} end -module Js_fold +module Js_iter = struct -#1 "js_fold.ml" +#1 "js_iter.ml" open J - class virtual fold = - object ((o : 'self_type)) - method unknown : 'a. 'a -> 'self_type = fun _ -> o - method string : string -> 'self_type = fun _ -> o + let unknown _self _ = () + class iter = + object ((_self : 'self_type)) method option : - 'a. ('self_type -> 'a -> 'self_type) -> 'a option -> 'self_type = - fun _f_a -> function | None -> o | Some _x -> let o = _f_a o _x in o + 'a. ('self_type -> 'a -> unit) -> 'a option -> unit = + fun _f_a -> function | None -> () | Some _x -> _f_a _self _x method list : - 'a. ('self_type -> 'a -> 'self_type) -> 'a list -> 'self_type = + 'a. ('self_type -> 'a -> unit) -> 'a list -> unit = fun _f_a -> function - | [] -> o - | _x :: _x_i1 -> let o = _f_a o _x in let o = o#list _f_a _x_i1 in o - method int32 : int32 -> 'self_type = fun _ -> o - method int : int -> 'self_type = fun _ -> o - method bool : bool -> 'self_type = fun _ -> o - method label : label -> 'self_type = o#string -method binop : binop -> 'self_type = o#unknown -method int_op : int_op -> 'self_type = o#unknown -method kind : kind -> 'self_type = o#unknown -method property : property -> 'self_type = o#unknown -method number : number -> 'self_type = o#unknown -method mutable_flag : mutable_flag -> 'self_type = o#unknown -method ident_info : ident_info -> 'self_type = o#unknown -method exports : exports -> 'self_type = o#unknown -method tag_info : tag_info -> 'self_type = o#unknown -method required_modules : required_modules -> 'self_type = o#list (fun o -> o#module_id) -method property_name : property_name -> 'self_type = o#unknown -method ident : ident -> 'self_type = o#unknown -method module_id : module_id -> 'self_type = fun { id = _x0;kind = _x1} -> let o = o#ident _x0 in -let o = o#unknown _x1 in o -method vident : vident -> 'self_type = function + | [] -> () + | _x :: _x_i1 -> _f_a _self _x ; _self#list _f_a _x_i1 + method label : label -> unit = unknown _self +method required_modules : required_modules -> unit = _self#list (fun _self -> _self#module_id) +method ident : ident -> unit = unknown _self +method module_id : module_id -> unit = fun { id = _x0;kind = _x1} -> begin _self#ident _x0 end +method vident : vident -> unit = function | Id ( _x0) -> -let o = o#ident _x0 in - o + begin _self#ident _x0 end |Qualified ( _x0,_x1) -> -let o = o#module_id _x0 in -let o = o#option (fun o -> o#string) _x1 in - o -method exception_ident : exception_ident -> 'self_type = o#ident -method for_ident : for_ident -> 'self_type = o#ident -method for_direction : for_direction -> 'self_type = o#unknown -method property_map : property_map -> 'self_type = o#list (fun o -> fun ( _x0,_x1) -> let o = o#property_name _x0 in let o = o#expression _x1 in o) -method length_object : length_object -> 'self_type = o#unknown -method expression_desc : expression_desc -> 'self_type = function + begin _self#module_id _x0;_self#option (fun _self -> unknown _self) _x1 end +method exception_ident : exception_ident -> unit = _self#ident +method for_ident : for_ident -> unit = _self#ident +method for_direction : for_direction -> unit = unknown _self +method property_map : property_map -> unit = _self#list (fun _self -> fun ( _x0,_x1) -> begin _self#expression _x1 end) +method length_object : length_object -> unit = unknown _self +method expression_desc : expression_desc -> unit = function | Length ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#length_object _x1 in - o + begin _self#expression _x0;_self#length_object _x1 end |Char_of_int ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Char_to_int ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Is_null_or_undefined ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |String_append ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o -|Bool ( _x0) -> -let o = o#bool _x0 in - o + begin _self#expression _x0;_self#expression _x1 end +|Bool _ -> () |Typeof ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Js_not ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Seq ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Cond ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#expression _x1 in -let o = o#expression _x2 in - o + begin _self#expression _x0;_self#expression _x1;_self#expression _x2 end |Bin ( _x0,_x1,_x2) -> -let o = o#binop _x0 in -let o = o#expression _x1 in -let o = o#expression _x2 in - o + begin _self#expression _x1;_self#expression _x2 end |FlatCall ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Call ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#expression) _x1 in -let o = o#unknown _x2 in - o + begin _self#expression _x0;_self#list (fun _self -> _self#expression) _x1 end |String_index ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Array_index ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Static_index ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#string _x1 in -let o = o#option (fun o -> o#int32) _x2 in - o + begin _self#expression _x0;_self#option (fun _self -> unknown _self) _x2 end |New ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#option (fun o -> o#list (fun o -> o#expression)) _x1 in - o + begin _self#expression _x0;_self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 end |Var ( _x0) -> -let o = o#vident _x0 in - o + begin _self#vident _x0 end |Fun ( _x0,_x1,_x2,_x3) -> -let o = o#bool _x0 in -let o = o#list (fun o -> o#ident) _x1 in -let o = o#block _x2 in -let o = o#unknown _x3 in - o -|Str ( _x0,_x1) -> -let o = o#bool _x0 in -let o = o#string _x1 in - o -|Unicode ( _x0) -> -let o = o#string _x0 in - o -|Raw_js_code ( _x0) -> -let o = o#unknown _x0 in - o + begin _self#list (fun _self -> _self#ident) _x1;_self#block _x2 end +|Str _ -> () +|Unicode _ -> () +|Raw_js_code _ -> () |Array ( _x0,_x1) -> -let o = o#list (fun o -> o#expression) _x0 in -let o = o#mutable_flag _x1 in - o + begin _self#list (fun _self -> _self#expression) _x0 end |Optional_block ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#bool _x1 in - o + begin _self#expression _x0 end |Caml_block ( _x0,_x1,_x2,_x3) -> -let o = o#list (fun o -> o#expression) _x0 in -let o = o#mutable_flag _x1 in -let o = o#expression _x2 in -let o = o#tag_info _x3 in - o + begin _self#list (fun _self -> _self#expression) _x0;_self#expression _x2 end |Caml_block_tag ( _x0) -> -let o = o#expression _x0 in - o -|Number ( _x0) -> -let o = o#number _x0 in - o + begin _self#expression _x0 end +|Number _ -> () |Object ( _x0) -> -let o = o#property_map _x0 in - o -|Undefined -> o -|Null -> o -method for_ident_expression : for_ident_expression -> 'self_type = o#expression -method finish_ident_expression : finish_ident_expression -> 'self_type = o#expression -method statement_desc : statement_desc -> 'self_type = function + begin _self#property_map _x0 end +|Undefined -> () +|Null -> () +method for_ident_expression : for_ident_expression -> unit = _self#expression +method finish_ident_expression : finish_ident_expression -> unit = _self#expression +method statement_desc : statement_desc -> unit = function | Block ( _x0) -> -let o = o#block _x0 in - o + begin _self#block _x0 end |Variable ( _x0) -> -let o = o#variable_declaration _x0 in - o + begin _self#variable_declaration _x0 end |Exp ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |If ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#block _x1 in -let o = o#block _x2 in - o + begin _self#expression _x0;_self#block _x1;_self#block _x2 end |While ( _x0,_x1,_x2,_x3) -> -let o = o#option (fun o -> o#label) _x0 in -let o = o#expression _x1 in -let o = o#block _x2 in -let o = o#unknown _x3 in - o + begin _self#option (fun _self -> _self#label) _x0;_self#expression _x1;_self#block _x2 end |ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> -let o = o#option (fun o -> o#for_ident_expression) _x0 in -let o = o#finish_ident_expression _x1 in -let o = o#for_ident _x2 in -let o = o#for_direction _x3 in -let o = o#block _x4 in -let o = o#unknown _x5 in - o + begin _self#option (fun _self -> _self#for_ident_expression) _x0;_self#finish_ident_expression _x1;_self#for_ident _x2;_self#for_direction _x3;_self#block _x4 end |Continue ( _x0) -> -let o = o#label _x0 in - o -|Break -> o + begin _self#label _x0 end +|Break -> () |Return ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Int_switch ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#int_clause) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o + begin _self#expression _x0;_self#list (fun _self -> _self#int_clause) _x1;_self#option (fun _self -> _self#block) _x2 end |String_switch ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#string_clause) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o + begin _self#expression _x0;_self#list (fun _self -> _self#string_clause) _x1;_self#option (fun _self -> _self#block) _x2 end |Throw ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Try ( _x0,_x1,_x2) -> -let o = o#block _x0 in -let o = o#option (fun o -> fun ( _x0,_x1) -> let o = o#exception_ident _x0 in let o = o#block _x1 in o) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o -|Debugger -> o -method expression : expression -> 'self_type = fun { expression_desc = _x0;comment = _x1} -> let o = o#expression_desc _x0 in -let o = o#option (fun o -> o#string) _x1 in o -method statement : statement -> 'self_type = fun { statement_desc = _x0;comment = _x1} -> let o = o#statement_desc _x0 in -let o = o#option (fun o -> o#string) _x1 in o -method variable_declaration : variable_declaration -> 'self_type = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let o = o#ident _x0 in -let o = o#option (fun o -> o#expression) _x1 in -let o = o#property _x2 in -let o = o#ident_info _x3 in o -method string_clause : string_clause -> 'self_type = fun ( _x0,_x1) -> let o = o#string _x0 in let o = o#case_clause _x1 in o -method int_clause : int_clause -> 'self_type = fun ( _x0,_x1) -> let o = o#int _x0 in let o = o#case_clause _x1 in o -method case_clause : case_clause -> 'self_type = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let o = o#block _x0 in -let o = o#bool _x1 in -let o = o#option (fun o -> o#string) _x2 in o -method block : block -> 'self_type = o#list (fun o -> o#statement) -method program : program -> 'self_type = fun { block = _x0;exports = _x1;export_set = _x2} -> let o = o#block _x0 in -let o = o#exports _x1 in -let o = o#unknown _x2 in o -method deps_program : deps_program -> 'self_type = fun { program = _x0;modules = _x1;side_effect = _x2} -> let o = o#program _x0 in -let o = o#required_modules _x1 in -let o = o#option (fun o -> o#string) _x2 in o + begin _self#block _x0;_self#option (fun _self -> fun ( _x0,_x1) -> begin _self#exception_ident _x0;_self#block _x1 end) _x1;_self#option (fun _self -> _self#block) _x2 end +|Debugger -> () +method expression : expression -> unit = fun { expression_desc = _x0;comment = _x1} -> begin _self#expression_desc _x0;_self#option (fun _self -> unknown _self) _x1 end +method statement : statement -> unit = fun { statement_desc = _x0;comment = _x1} -> begin _self#statement_desc _x0;_self#option (fun _self -> unknown _self) _x1 end +method variable_declaration : variable_declaration -> unit = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> begin _self#ident _x0;_self#option (fun _self -> _self#expression) _x1 end +method string_clause : string_clause -> unit = fun ( _x0,_x1) -> begin _self#case_clause _x1 end +method int_clause : int_clause -> unit = fun ( _x0,_x1) -> begin _self#case_clause _x1 end +method case_clause : case_clause -> unit = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> begin _self#block _x0;_self#option (fun _self -> unknown _self) _x2 end +method block : block -> unit = _self#list (fun _self -> _self#statement) +method program : program -> unit = fun { block = _x0;exports = _x1;export_set = _x2} -> begin _self#block _x0 end +method deps_program : deps_program -> unit = fun { program = _x0;modules = _x1;side_effect = _x2} -> begin _self#program _x0;_self#required_modules _x1;_self#option (fun _self -> unknown _self) _x2 end end end @@ -87083,23 +86969,22 @@ let add_defined_idents (x : idents_stats) ident = Note such shaking is done in the toplevel, so that it requires us to flatten the statement first *) -let free_variables (stats : idents_stats) : Js_fold.fold = +let free_variables (stats : idents_stats) : Js_iter.iter = object (self) - inherit Js_fold.fold as super + inherit Js_iter.iter as super method! variable_declaration st = add_defined_idents stats st.ident; match st.value with | None - -> self + -> () | Some v -> self # expression v method! ident id = (if not (Set_ident.mem stats.defined_idents id )then - stats.used_idents <- Set_ident.add stats.used_idents id); - self - method! expression exp = + stats.used_idents <- Set_ident.add stats.used_idents id) + method! expression exp = match exp.expression_desc with | Fun(_, _,_, env) (** a optimization to avoid walking into funciton again @@ -87107,8 +86992,8 @@ let free_variables (stats : idents_stats) : Js_fold.fold = *) -> stats.used_idents <- - Set_ident.union (Js_fun_env.get_unbounded env) stats.used_idents; - self + Set_ident.union (Js_fun_env.get_unbounded env) stats.used_idents + | _ -> @@ -87179,32 +87064,31 @@ and no_side_effect (x : J.expression) = let no_side_effect_expression (x : J.expression) = no_side_effect x -let no_side_effect clean : Js_fold.fold = +let no_side_effect clean : Js_iter.iter = object (self) - inherit Js_fold.fold as super + inherit Js_iter.iter as super method! statement s = - if not !clean then self else + if !clean then match s.statement_desc with | Throw _ | Debugger | Break | Variable _ | Continue _ -> - clean := false ; self + clean := false | Exp e -> self#expression e | Int_switch _ | String_switch _ | ForRange _ | If _ | While _ | Block _ | Return _ | Try _ -> super#statement s method! list f x = - if not !clean then self else super#list f x + if !clean then super#list f x method! expression s = - (if !clean then - clean := no_side_effect_expression s); - self - (** only expression would cause side effec *) + if !clean then + clean := no_side_effect_expression s + (** only expression would cause side effec *) end let no_side_effect_statement st = let clean = ref true in - let _ : Js_fold.fold = ((no_side_effect clean)#statement st) in + (no_side_effect clean)#statement st; !clean (* TODO: generate [fold2] @@ -97364,7 +97248,7 @@ val module_data : end = struct #1 "builtin_cmj_datasets.ml" -(* 9097ac58a880bd250b75abc9bbe3ab23 *) +(* 95bdc35141d59aa599978fe46d5f8ea8 *) let module_names : string array = Obj.magic ( "Js" (* 23 *), "Arg" (* 289 *), @@ -97393,7 +97277,7 @@ let module_names : string array = Obj.magic ( "Digest" (* 428 *), "Format" (* 4181 *), "Genlex" (* 44 *), -"Js_exn" (* 932 *), +"Js_exn" (* 1083 *), "Js_int" (* 114 *), "Js_obj" (* 23 *), "Lexing" (* 818 *), @@ -97525,7 +97409,7 @@ let module_data : string array = Obj.magic ( (* Digest *)"\132\149\166\190\000\000\001\152\000\000\000t\000\000\001}\000\000\001f\160\b\000\000,\000\176$file\144\160\160A@@@\176%bytes\144\160\160A@@@\176%equal\144\160\160B@@@\176%input\144\160\160A@@\144\148\192A\160\176\001\004\199$chan@@\147\176\151\176\161\000C\1463really_input_string\160\145\176@*PervasivesA@\176\192&_none_A@\000\255\004\002A\160\144\004\018\160\146\160\018_i\000\000\000\000\016@@\176\176\1924stdlib-406/digest.mlo\001\007=\001\007N\192\004\002o\001\007=\001\007i@BA\160BA\176&output\144\160\160B@@\144\148\192B\160\176\001\004\196$chan@\160\176\001\004\197&digest@@\147\176\151\176\161o\146-output_string\160\145\004(@\004&\160\144\004\016\160\144\004\015@\176\176\192\004!m\001\007 \001\007\"\192\004\"m\001\007 \001\007;@BA\160BA\176&string\144\160\160A@@@\176&to_hex\144\160\160A@@@\176'compare\144\160\160B@@@\176(from_hex\144\160\160A@@@\176(subbytes\144\160\160C@@@\176)substring\144\160\160C@@@A", (* Format *)"\132\149\166\190\000\000\016A\000\000\003y\000\000\012~\000\000\011`\160\b\000\001\252\000\176&printf\144\160\160A@@@\176&stdbuf\144\160@@@\176'bprintf\144\160\160B@@@\176'eprintf\144\160\160A@@@\176'fprintf\144\160\160B@@@\176'kprintf\144\160\160B@@@\176'set_tab\144\160\160A@@@\176'sprintf\144\160\160A@@@\176(asprintf\144\160\160A@@@\176(ifprintf\144\160\160B\160A@@@\176(kfprintf\144\160\160C@@@\176(ksprintf\144\004\031@\176(open_box\144\160\160A@@@\176(open_tag\144\160\160A@@@\176(print_as\144\160\160B@@@\176(set_tags\144\160\160A@@@\176)close_box\144\160\160A@@@\176)close_tag\144\160\160A@@@\176)ikfprintf\144\160\160C\004,@@\176)kasprintf\144\160\160B@@@\176)open_hbox\144\160\160A@@@\176)open_tbox\144\160\160A@@@\176)open_vbox\144\160\160A@@@\176)print_cut\144\160\160A@@@\176)print_int\144\160\160A@@@\176)print_tab\144\160\160A@@@\176*close_tbox\144\160\160A@@@\176*get_margin\144\160\160A@@@\176*open_hvbox\144\160\160A@@@\176*pp_set_tab\144\160\160B@@@\176*print_bool\144\160\160A@@@\176*print_char\144\160\160A@@@\176*set_margin\144\160\160A@@@\176+open_hovbox\144\160\160A@@@\176+pp_open_box\144\160\160B@@@\176+pp_open_tag\144\160\160B@@@\176+pp_print_as\144\160\160C@@@\176+pp_set_tags\144\160\160B@@@\176+print_break\144\160\160B@@@\176+print_float\144\160\160A@@@\176+print_flush\144\160\160A@@@\176+print_space\144\160\160A@@@\176,pp_close_box\144\160\160B@@@\176,pp_close_tag\144\160\160B@@@\176,pp_open_hbox\144\160\160B@@@\176,pp_open_tbox\144\160\160B@@@\176,pp_open_vbox\144\160\160B@@@\176,pp_print_cut\144\160\160B@@@\176,pp_print_int\144\160\160B@@@\176,pp_print_tab\144\160\160B@@@\176,print_string\144\160\160A@@@\176,print_tbreak\144\160\160B@@@\176-err_formatter\144\160@@@\176-force_newline\144\160\160A@@@\176-get_mark_tags\144\160\160A@@@\176-get_max_boxes\144\160\160A@@@\176-pp_close_tbox\144\160\160B@@@\176-pp_get_margin\144\160\160B@@\144\148\192B\160\176\001\006G%state@\160\176\001\006H%param@@\151\176\161E\161)pp_marginA\160\144\004\012@\176\1924stdlib-406/format.ml\001\003r\001o\197\001o\226\192\004\002\001\003r\001o\197\001o\241@\160BA\176-pp_open_hvbox\144\160\160B@@@\176-pp_print_bool\144\160\160B@@@\176-pp_print_char\144\160\160B@@@\176-pp_print_list\144\160\160D@@@\176-pp_print_text\144\160\160B@@@\176-pp_set_margin\144\160\160B@@@\176-print_newline\144\160\160A@@@\176-set_mark_tags\144\160\160A@@@\176-set_max_boxes\144\160\160A@@@\176-std_formatter\144\160@@@\176-str_formatter\144\160@@@\176.get_max_indent\144\160\160A@@@\176.get_print_tags\144\160\160A@@@\176.make_formatter\144\160\160B@@@\176.over_max_boxes\144\160\160A@@@\176.pp_open_hovbox\144\160\160B@@@\176.pp_print_break\144\160\160C@@@\176.pp_print_float\144\160\160B@@@\176.pp_print_flush\144\160\160B@@@\176.pp_print_space\144\160\160B@@@\176.set_max_indent\144\160\160A@@@\176.set_print_tags\144\160\160A@@@\176/pp_print_string\144\160\160B@@@\176/pp_print_tbreak\144\160\160C@@@\1760pp_force_newline\144\160\160B@@@\1760pp_get_mark_tags\144\160\160B@@\144\148\192B\160\176\001\005\190%state@\160\176\001\005\191\004\149@@\151\176\161V\161,pp_mark_tagsA\160\144\004\011@\176\192\004\148\001\002{\001T/\001TO\192\004\149\001\002{\001T/\001Ta@\160BA\1760pp_get_max_boxes\144\160\160B@@\144\148\192B\160\176\001\006*%state@\160\176\001\006+\004\173@@\151\176\161N\161,pp_max_boxesA\160\144\004\011@\176\192\004\172\001\003A\001i\238\001j\014\192\004\173\001\003A\001i\238\001j @\160BA\1760pp_print_newline\144\160\160B@@@\1760pp_set_mark_tags\144\160\160B@@\144\148\192B\160\176\001\005\184%state@\160\176\001\005\185!b@@\151\176\162V\144\0046\160\144\004\011\160\144\004\n@\176\192\004\203\001\002y\001S\195\001S\226\192\004\204\001\002y\001S\195\001S\249@\160BA\1760pp_set_max_boxes\144\160\160B@@@\1760print_if_newline\144\160\160A@@@\1761get_ellipsis_text\144\160\160A@@@\1761pp_get_max_indent\144\160\160B@@\144\148\192B\160\176\001\006?%state@\160\176\001\006@\004\243@@\151\176\161G\161-pp_max_indentA\160\144\004\011@\176\192\004\242\001\003_\001m\025\001m:\192\004\243\001\003_\001m\025\001mM@\160BA\1761pp_get_print_tags\144\160\160B@@\144\148\192B\160\176\001\005\187%state@\160\176\001\005\188\005\001\011@@\151\176\161U\161-pp_print_tagsA\160\144\004\011@\176\192\005\001\n\001\002z\001S\250\001T\027\192\005\001\011\001\002z\001S\250\001T.@\160BA\1761pp_over_max_boxes\144\160\160B@@@\1761pp_set_max_indent\144\160\160B@@@\1761pp_set_print_tags\144\160\160B@@\144\148\192B\160\176\001\005\181%state@\160\176\001\005\182!b@@\151\176\162U\144\004#\160\144\004\011\160\144\004\n@\176\192\005\001.\001\002x\001S\138\001S\170\192\005\001/\001\002x\001S\138\001S\194@\160BA\1761set_ellipsis_text\144\160\160A@@@\1763flush_str_formatter\144\160\160A@@@\1763formatter_of_buffer\144\160\160A@@@\1763pp_print_if_newline\144\160\160B@@@\1764pp_get_ellipsis_text\144\160\160B@@\144\148\192B\160\176\001\0063%state@\160\176\001\0064\005\001[@@\151\176\161O\161+pp_ellipsisA\160\144\004\011@\176\192\005\001Z\001\003G\001j\183\001j\219\192\005\001[\001\003G\001j\183\001j\236@\160BA\1764pp_set_ellipsis_text\144\160\160B@@\144\148\192B\160\176\001\0061%state@\160\176\001\0062!s@@\151\176\162O\144\004\025\160\144\004\011\160\144\004\n@\176\192\005\001t\001\003F\001j}\001j\160\192\005\001u\001\003F\001j}\001j\182@\160BA\1768add_symbolic_output_item\144\160\160B@@@\1768formatter_of_out_channel\144\160\160A@@@\1769set_formatter_out_channel\144\160\160A@@@\176:formatter_of_out_functions\144\160\160A@@@\176:get_symbolic_output_buffer\144\160\160A@@\144\148\192A\160\176\001\006\185#sob@@\147\176\151\176\161H\146#rev\160\145\176@$ListA@\176\192&_none_A@\000\255\004\002A\160\151\176\161@\1618symbolic_output_contentsA\160\144\004\024@\176\192\005\001\173\001\004@\002\000\000\135\137\002\000\000\135\148\192\005\001\174\001\004@\002\000\000\135\137\002\000\000\135\176@@\176\176\192\005\001\177\001\004@\002\000\000\135\137\002\000\000\135\139\004\004@BA\160BA\176;get_formatter_out_functions\144\160\160A@@@\176;get_formatter_tag_functions\144\160\160A@@@\176;make_symbolic_output_buffer\144\160\160A@@\144\148\192A\160\176\001\006\181\005\001\208@@\151\176\176@\144\144\004#A\160\146\160\018_i\000\000\000\000\000\144\176\"[]AA@\176\192\005\001\212\001\004:\002\000\000\134\242\002\000\000\134\244\192\005\001\213\001\004:\002\000\000\134\242\002\000\000\135\021@\160BA\176;set_formatter_out_functions\144\160\160A@@@\176;set_formatter_tag_functions\144\160\160A@@@\176\002\000\000\135@\192\005\001\250\001\004=\002\000\000\135>\002\000\000\135b@\160BA\176get_formatter_output_functions\144\160\160A@@@\176>pp_get_formatter_out_functions\144\160\160B@@@\176>pp_get_formatter_tag_functions\144\160\160B@@@\176>pp_set_formatter_out_functions\144\160\160B@@@\176>pp_set_formatter_tag_functions\144\160\160B@@@\176>set_formatter_output_functions\144\160\160B@@@\176\t!pp_get_formatter_output_functions\144\160\160B@@@\176\t!pp_set_formatter_output_functions\144\160\160C@@@\176\t\"get_all_formatter_output_functions\144\160\160A@@@\176\t\"set_all_formatter_output_functions\144\160\160D@@@\176\t#formatter_of_symbolic_output_buffer\144\160\160A@@@\176\t%pp_get_all_formatter_output_functions\144\160\160B@@@\176\t%pp_set_all_formatter_output_functions\144\160\160E@@@@", (* Genlex *)"\132\149\166\190\000\000\000\024\000\000\000\b\000\000\000\024\000\000\000\023\160\144\176*make_lexer\144\160\160A\160A@@@A", -(* Js_exn *)"\132\149\166\190\000\000\003\144\000\000\000\214\000\000\002\244\000\000\002\213\160\240\176*raiseError\144\160\160A@A\144\148\192A\160\176\001\003\249#str@@\151\176C\160\151\176\181%Error\160\160AA@\182%Error@@\160\144\004\015@\176\1920others/js_exn.mlq\001\007z\001\007\142\192\004\002q\001\007z\001\007\155@@\176\192\004\004q\001\007z\001\007|\192\004\005q\001\007z\001\007\171@\160BA\176-raiseUriError\144\160\160A@A\144\148\192A\160\176\001\004\017#str@@\151\176C\160\151\176\181(URIError\160\004 @\182(URIError@@\160\144\004\014@\176\192\004\031\000V\001\011}\001\011\144\192\004 \000V\001\011}\001\011\162@@\176\192\004\"\000V\001\011}\001\011\127\192\004#\000V\001\011}\001\011\163@\160BA\176.raiseEvalError\144\160\160A@A\144\148\192A\160\176\001\003\253#str@@\151\176C\160\151\176\181)EvalError\160\004>@\182)EvalError@@\160\144\004\014@\176\192\004=w\001\b\031\001\b3\192\004>w\001\b\031\001\bD@@\176\192\004@w\001\b\031\001\b!\192\004Aw\001\b\031\001\bY@\160BA\176.raiseTypeError\144\160\160A@A\144\148\192A\160\176\001\004\r#str@@\151\176C\160\151\176\181)TypeError\160\004\\@\182)TypeError@@\160\144\004\014@\176\192\004[\000P\001\n\231\001\n\250\192\004\\\000P\001\n\231\001\011\r@@\176\192\004^\000P\001\n\231\001\n\233\192\004_\000P\001\n\231\001\011\014@\160BA\176/raiseRangeError\144\160\160A@A\144\148\192A\160\176\001\004\001#str@@\151\176C\160\151\176\181*RangeError\160\004z@\182*RangeError@@\160\144\004\014@\176\192\004y}\001\b\211\001\b\231\192\004z}\001\b\211\001\b\249@@\176\192\004|}\001\b\211\001\b\213\192\004}}\001\b\211\001\t\015@\160BA\1760raiseSyntaxError\144\160\160A@A\144\148\192A\160\176\001\004\t#str@@\151\176C\160\151\176\181+SyntaxError\160\004\152@\182+SyntaxError@@\160\144\004\014@\176\192\004\151\000J\001\nJ\001\n]\192\004\152\000J\001\nJ\001\nr@@\176\192\004\154\000J\001\nJ\001\nL\192\004\155\000J\001\nJ\001\ns@\160BA\1763raiseReferenceError\144\160\160A@A\144\148\192A\160\176\001\004\005#str@@\151\176C\160\151\176\181.ReferenceError\160\004\182@\182.ReferenceError@@\160\144\004\014@\176\192\004\181\000D\001\t\159\001\t\178\192\004\182\000D\001\t\159\001\t\202@@\176\192\004\184\000D\001\t\159\001\t\161\192\004\185\000D\001\t\159\001\t\203@\160BAA", +(* Js_exn *)"\132\149\166\190\000\000\004'\000\000\000\246\000\000\003g\000\000\003@\160\b\000\000 \000\176*raiseError\144\160\160A@A\144\148\192A\160\176\001\0048#str@@\151\176C\160\151\176\181%Error\160\160AA@\182%Error@@\160\144\004\015@\176\1920others/js_exn.mlu\001\007\213\001\007\233\192\004\002u\001\007\213\001\007\246@@\176\192\004\004u\001\007\213\001\007\215\192\004\005u\001\007\213\001\b\006@\160BA\176-raiseUriError\144\160\160A@A\144\148\192A\160\176\001\004P#str@@\151\176C\160\151\176\181(URIError\160\004 @\182(URIError@@\160\144\004\014@\176\192\004\031\000Z\001\011\216\001\011\235\192\004 \000Z\001\011\216\001\011\253@@\176\192\004\"\000Z\001\011\216\001\011\218\192\004#\000Z\001\011\216\001\011\254@\160BA\176.raiseEvalError\144\160\160A@A\144\148\192A\160\176\001\004<#str@@\151\176C\160\151\176\181)EvalError\160\004>@\182)EvalError@@\160\144\004\014@\176\192\004={\001\bz\001\b\142\192\004>{\001\bz\001\b\159@@\176\192\004@{\001\bz\001\b|\192\004A{\001\bz\001\b\180@\160BA\176.raiseTypeError\144\160\160A@A\144\148\192A\160\176\001\004L#str@@\151\176C\160\151\176\181)TypeError\160\004\\@\182)TypeError@@\160\144\004\014@\176\192\004[\000T\001\011B\001\011U\192\004\\\000T\001\011B\001\011h@@\176\192\004^\000T\001\011B\001\011D\192\004_\000T\001\011B\001\011i@\160BA\176/raiseRangeError\144\160\160A@A\144\148\192A\160\176\001\004@#str@@\151\176C\160\151\176\181*RangeError\160\004z@\182*RangeError@@\160\144\004\014@\176\192\004y\000A\001\t.\001\tB\192\004z\000A\001\t.\001\tT@@\176\192\004|\000A\001\t.\001\t0\192\004}\000A\001\t.\001\tj@\160BA\1760anyToExnInternal\144\160\160A@@\144\148\192A\160\176\001\003\249!x@@\147\176\151\176\161A\1468internalToOCamlException\160\145\176@2Caml_js_exceptionsA@\176\192&_none_A@\000\255\004\002A\160\144\004\018@\176\176\192\004\156q\001\007~\001\007\130\192\004\157q\001\007~\001\007\186@BA\160BA\1760raiseSyntaxError\144\160\160A@A\144\148\192A\160\176\001\004H#str@@\151\176C\160\151\176\181+SyntaxError\160\004\184@\182+SyntaxError@@\160\144\004\014@\176\192\004\183\000N\001\n\165\001\n\184\192\004\184\000N\001\n\165\001\n\205@@\176\192\004\186\000N\001\n\165\001\n\167\192\004\187\000N\001\n\165\001\n\206@\160BA\1763raiseReferenceError\144\160\160A@A\144\148\192A\160\176\001\004D#str@@\151\176C\160\151\176\181.ReferenceError\160\004\214@\182.ReferenceError@@\160\144\004\014@\176\192\004\213\000H\001\t\250\001\n\r\192\004\214\000H\001\t\250\001\n%@@\176\192\004\216\000H\001\t\250\001\t\252\192\004\217\000H\001\t\250\001\n&@\160BAA", (* Js_int *)"\132\149\166\190\000\000\000^\000\000\000\028\000\000\000X\000\000\000U\160\144\176%equal\144\160\160B@@\144\148\192B\160\176\001\003\242!x@\160\176\001\003\243!y@@\151\176\153@\160\144\004\n\160\144\004\t@\176\1920others/js_int.ml\001\000\161\001\023\132\001\023\155\192\004\002\001\000\161\001\023\132\001\023\160@\160BAA", (* Js_obj *)"\132\149\166\190\000\000\000\003\000\000\000\001\000\000\000\003\000\000\000\003\160\128A", (* Lexing *)"\132\149\166\190\000\000\003\030\000\000\000\197\000\000\002\161\000\000\002|\160\b\000\000D\000\176&engine\144\160\160C@@@\176&lexeme\144\160\160A@@@\176(new_line\144\160\160A@@@\176*lexeme_end\144\160\160A@@\144\148\192A\160\176\001\005\012&lexbuf@@\151\176\161C\161(pos_cnum@\160\151\176\161K\161*lex_curr_pA\160\144\004\015@\176\1924stdlib-406/lexing.ml\001\000\216\001\027w\001\027\143\192\004\002\001\000\216\001\027w\001\027\160@@\176\004\004\192\004\004\001\000\216\001\027w\001\027\169@\160BA\176*new_engine\144\160\160C@@@\176*sub_lexeme\144\160\160C@@@\176+flush_input\144\160\160A@@@\176+from_string\144\160\160A@@@\176+lexeme_char\144\160\160B@@@\176,from_channel\144\160\160A@@@\176,lexeme_end_p\144\160\160A@@\144\148\192A\160\176\001\005\016&lexbuf@@\151\176\161K\161\0047A\160\144\004\b@\176\192\0046\001\000\219\001\027\218\001\027\244\192\0047\001\000\219\001\027\218\001\028\005@\160BA\176,lexeme_start\144\160\160A@@\144\148\192A\160\176\001\005\n&lexbuf@@\151\176\161C\161\004R@\160\151\176\161J\161+lex_start_pA\160\144\004\014@\176\192\004Q\001\000\215\001\027A\001\027[\192\004R\001\000\215\001\027A\001\027m@@\176\004\003\192\004T\001\000\215\001\027A\001\027v@\160BA\176-from_function\144\160\160A@@@\176.lexeme_start_p\144\160\160A@@\144\148\192A\160\176\001\005\014&lexbuf@@\151\176\161J\161\004\029A\160\144\004\b@\176\192\004m\001\000\218\001\027\171\001\027\199\192\004n\001\000\218\001\027\171\001\027\217@\160BA\176.sub_lexeme_opt\144\160\160C@@@\176/sub_lexeme_char\144\160\160B@@\144\148\192B\160\176\001\005\001&lexbuf@\160\176\001\005\002!i@@\151\176c\160\151\176\161A\161*lex_bufferA\160\144\004\015@\176\192\004\142\001\000\203\001\026?\001\026h\192\004\143\001\000\203\001\026?\001\026y@\160\144\004\017@\176\192\004\147\001\000\203\001\026?\001\026^\192\004\148\001\000\203\001\026?\001\026{@\160BA\1763sub_lexeme_char_opt\144\160\160B@@@A", @@ -99256,11 +99140,11 @@ end = struct let add_lam_module_ident = Lam_module_ident.Hash_set.add let create = Lam_module_ident.Hash_set.create let count_hard_dependencies hard_dependencies = - object(self : 'self_type) - inherit Js_fold.fold as super + object + inherit Js_iter.iter as super method! module_id vid = - add_lam_module_ident hard_dependencies vid; self - method! expression x : 'self_type = + add_lam_module_ident hard_dependencies vid + method! expression x = (* check {!Js_pass_scope} when making changes *) (match Js_block_runtime.check_additional_id x with | Some id -> @@ -99273,7 +99157,7 @@ let count_hard_dependencies hard_dependencies = let calculate_hard_dependencies block = let hard_dependencies = create 17 in - let _ : Js_fold.fold = (count_hard_dependencies hard_dependencies)#block block in + (count_hard_dependencies hard_dependencies)#block block ; hard_dependencies (* @@ -101479,241 +101363,199 @@ module Js_map #1 "js_map.ml" open J -class virtual map = object -((o : 'self_type)) -method unknown : 'a. 'a -> 'a = fun x -> x -method string : string -> string = fun x -> x +let unknown : 'a. 'a -> 'a = fun x -> x +class map = object +((_self : 'self_type)) method option : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a option -> 'a_out option = fun _f_a -> - function | None -> None | Some _x -> let _x = _f_a o _x in Some _x + function | None -> None | Some _x -> let _x = _f_a _self _x in Some _x method list : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a list -> 'a_out list = fun _f_a -> function | [] -> [] | _x :: _x_i1 -> - let _x = _f_a o _x in - let _x_i1 = o#list _f_a _x_i1 in _x :: _x_i1 -method int32 : int32 -> int32 = fun x -> x -method int : int -> int = fun x -> x -method bool : bool -> bool = fun x -> x -method label : label -> label = o#string -method binop : binop -> binop = o#unknown -method int_op : int_op -> int_op = o#unknown -method kind : kind -> kind = o#unknown -method property : property -> property = o#unknown -method number : number -> number = o#unknown -method mutable_flag : mutable_flag -> mutable_flag = o#unknown -method ident_info : ident_info -> ident_info = o#unknown -method exports : exports -> exports = o#unknown -method tag_info : tag_info -> tag_info = o#unknown -method required_modules : required_modules -> required_modules = o#list (fun o -> o#module_id) -method property_name : property_name -> property_name = o#unknown -method ident : ident -> ident = o#unknown -method module_id : module_id -> module_id = fun { id = _x0;kind = _x1} -> let _x0 = o#ident _x0 in -let _x1 = o#unknown _x1 in {id = _x0;kind = _x1} + let _x = _f_a _self _x in + let _x_i1 = _self#list _f_a _x_i1 in _x :: _x_i1 +method label : label -> label = unknown +method required_modules : required_modules -> required_modules = _self#list (fun _self -> _self#module_id) +method ident : ident -> ident = unknown +method module_id : module_id -> module_id = fun { id = _x0;kind = _x1} -> let _x0 = _self#ident _x0 in {id = _x0;kind = _x1} method vident : vident -> vident = function | Id ( _x0) -> -let _x0 = o#ident _x0 in +let _x0 = _self#ident _x0 in Id ( _x0) |Qualified ( _x0,_x1) -> -let _x0 = o#module_id _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in +let _x0 = _self#module_id _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in Qualified ( _x0,_x1) -method exception_ident : exception_ident -> exception_ident = o#ident -method for_ident : for_ident -> for_ident = o#ident -method for_direction : for_direction -> for_direction = o#unknown -method property_map : property_map -> property_map = o#list (fun o -> fun ( _x0,_x1) -> let _x0 = o#property_name _x0 in let _x1 = o#expression _x1 in _x0,_x1) -method length_object : length_object -> length_object = o#unknown +method exception_ident : exception_ident -> exception_ident = _self#ident +method for_ident : for_ident -> for_ident = _self#ident +method for_direction : for_direction -> for_direction = unknown +method property_map : property_map -> property_map = _self#list (fun _self -> fun ( _x0,_x1) -> let _x1 = _self#expression _x1 in _x0,_x1) +method length_object : length_object -> length_object = unknown method expression_desc : expression_desc -> expression_desc = function | Length ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#length_object _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#length_object _x1 in Length ( _x0,_x1) |Char_of_int ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Char_of_int ( _x0) |Char_to_int ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Char_to_int ( _x0) |Is_null_or_undefined ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Is_null_or_undefined ( _x0) |String_append ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in String_append ( _x0,_x1) -|Bool ( _x0) -> -let _x0 = o#bool _x0 in -Bool ( _x0) +|Bool _ as v -> v |Typeof ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Typeof ( _x0) |Js_not ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Js_not ( _x0) |Seq ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in Seq ( _x0,_x1) |Cond ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#expression _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in +let _x2 = _self#expression _x2 in Cond ( _x0,_x1,_x2) |Bin ( _x0,_x1,_x2) -> -let _x0 = o#binop _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#expression _x2 in +let _x1 = _self#expression _x1 in +let _x2 = _self#expression _x2 in Bin ( _x0,_x1,_x2) |FlatCall ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in FlatCall ( _x0,_x1) |Call ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#expression) _x1 in -let _x2 = o#unknown _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#expression) _x1 in Call ( _x0,_x1,_x2) |String_index ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in String_index ( _x0,_x1) |Array_index ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in Array_index ( _x0,_x1) |Static_index ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#string _x1 in -let _x2 = o#option (fun o -> o#int32) _x2 in +let _x0 = _self#expression _x0 in +let _x2 = _self#option (fun _self -> unknown) _x2 in Static_index ( _x0,_x1,_x2) |New ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#option (fun o -> o#list (fun o -> o#expression)) _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 in New ( _x0,_x1) |Var ( _x0) -> -let _x0 = o#vident _x0 in +let _x0 = _self#vident _x0 in Var ( _x0) |Fun ( _x0,_x1,_x2,_x3) -> -let _x0 = o#bool _x0 in -let _x1 = o#list (fun o -> o#ident) _x1 in -let _x2 = o#block _x2 in -let _x3 = o#unknown _x3 in +let _x1 = _self#list (fun _self -> _self#ident) _x1 in +let _x2 = _self#block _x2 in Fun ( _x0,_x1,_x2,_x3) -|Str ( _x0,_x1) -> -let _x0 = o#bool _x0 in -let _x1 = o#string _x1 in -Str ( _x0,_x1) -|Unicode ( _x0) -> -let _x0 = o#string _x0 in -Unicode ( _x0) -|Raw_js_code ( _x0) -> -let _x0 = o#unknown _x0 in -Raw_js_code ( _x0) +|Str _ as v -> v +|Unicode _ as v -> v +|Raw_js_code _ as v -> v |Array ( _x0,_x1) -> -let _x0 = o#list (fun o -> o#expression) _x0 in -let _x1 = o#mutable_flag _x1 in +let _x0 = _self#list (fun _self -> _self#expression) _x0 in Array ( _x0,_x1) |Optional_block ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#bool _x1 in +let _x0 = _self#expression _x0 in Optional_block ( _x0,_x1) |Caml_block ( _x0,_x1,_x2,_x3) -> -let _x0 = o#list (fun o -> o#expression) _x0 in -let _x1 = o#mutable_flag _x1 in -let _x2 = o#expression _x2 in -let _x3 = o#tag_info _x3 in +let _x0 = _self#list (fun _self -> _self#expression) _x0 in +let _x2 = _self#expression _x2 in Caml_block ( _x0,_x1,_x2,_x3) |Caml_block_tag ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Caml_block_tag ( _x0) -|Number ( _x0) -> -let _x0 = o#number _x0 in -Number ( _x0) +|Number _ as v -> v |Object ( _x0) -> -let _x0 = o#property_map _x0 in +let _x0 = _self#property_map _x0 in Object ( _x0) -|Undefined -> Undefined -|Null -> Null -method for_ident_expression : for_ident_expression -> for_ident_expression = o#expression -method finish_ident_expression : finish_ident_expression -> finish_ident_expression = o#expression +|Undefined as v -> v +|Null as v -> v +method for_ident_expression : for_ident_expression -> for_ident_expression = _self#expression +method finish_ident_expression : finish_ident_expression -> finish_ident_expression = _self#expression method statement_desc : statement_desc -> statement_desc = function | Block ( _x0) -> -let _x0 = o#block _x0 in +let _x0 = _self#block _x0 in Block ( _x0) |Variable ( _x0) -> -let _x0 = o#variable_declaration _x0 in +let _x0 = _self#variable_declaration _x0 in Variable ( _x0) |Exp ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Exp ( _x0) |If ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#block _x1 in -let _x2 = o#block _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#block _x1 in +let _x2 = _self#block _x2 in If ( _x0,_x1,_x2) |While ( _x0,_x1,_x2,_x3) -> -let _x0 = o#option (fun o -> o#label) _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#block _x2 in -let _x3 = o#unknown _x3 in +let _x0 = _self#option (fun _self -> _self#label) _x0 in +let _x1 = _self#expression _x1 in +let _x2 = _self#block _x2 in While ( _x0,_x1,_x2,_x3) |ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> -let _x0 = o#option (fun o -> o#for_ident_expression) _x0 in -let _x1 = o#finish_ident_expression _x1 in -let _x2 = o#for_ident _x2 in -let _x3 = o#for_direction _x3 in -let _x4 = o#block _x4 in -let _x5 = o#unknown _x5 in +let _x0 = _self#option (fun _self -> _self#for_ident_expression) _x0 in +let _x1 = _self#finish_ident_expression _x1 in +let _x2 = _self#for_ident _x2 in +let _x3 = _self#for_direction _x3 in +let _x4 = _self#block _x4 in ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) |Continue ( _x0) -> -let _x0 = o#label _x0 in +let _x0 = _self#label _x0 in Continue ( _x0) -|Break -> Break +|Break as v -> v |Return ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Return ( _x0) |Int_switch ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#int_clause) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#int_clause) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in Int_switch ( _x0,_x1,_x2) |String_switch ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#string_clause) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#string_clause) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in String_switch ( _x0,_x1,_x2) |Throw ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Throw ( _x0) |Try ( _x0,_x1,_x2) -> -let _x0 = o#block _x0 in -let _x1 = o#option (fun o -> fun ( _x0,_x1) -> let _x0 = o#exception_ident _x0 in let _x1 = o#block _x1 in _x0,_x1) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#block _x0 in +let _x1 = _self#option (fun _self -> fun ( _x0,_x1) -> let _x0 = _self#exception_ident _x0 in let _x1 = _self#block _x1 in _x0,_x1) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in Try ( _x0,_x1,_x2) -|Debugger -> Debugger -method expression : expression -> expression = fun { expression_desc = _x0;comment = _x1} -> let _x0 = o#expression_desc _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in {expression_desc = _x0;comment = _x1} -method statement : statement -> statement = fun { statement_desc = _x0;comment = _x1} -> let _x0 = o#statement_desc _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in {statement_desc = _x0;comment = _x1} -method variable_declaration : variable_declaration -> variable_declaration = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _x0 = o#ident _x0 in -let _x1 = o#option (fun o -> o#expression) _x1 in -let _x2 = o#property _x2 in -let _x3 = o#ident_info _x3 in {ident = _x0;value = _x1;property = _x2;ident_info = _x3} -method string_clause : string_clause -> string_clause = fun ( _x0,_x1) -> let _x0 = o#string _x0 in let _x1 = o#case_clause _x1 in _x0,_x1 -method int_clause : int_clause -> int_clause = fun ( _x0,_x1) -> let _x0 = o#int _x0 in let _x1 = o#case_clause _x1 in _x0,_x1 -method case_clause : case_clause -> case_clause = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _x0 = o#block _x0 in -let _x1 = o#bool _x1 in -let _x2 = o#option (fun o -> o#string) _x2 in {switch_body = _x0;should_break = _x1;comment = _x2} -method block : block -> block = o#list (fun o -> o#statement) -method program : program -> program = fun { block = _x0;exports = _x1;export_set = _x2} -> let _x0 = o#block _x0 in -let _x1 = o#exports _x1 in -let _x2 = o#unknown _x2 in {block = _x0;exports = _x1;export_set = _x2} -method deps_program : deps_program -> deps_program = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _x0 = o#program _x0 in -let _x1 = o#required_modules _x1 in -let _x2 = o#option (fun o -> o#string) _x2 in {program = _x0;modules = _x1;side_effect = _x2} +|Debugger as v -> v +method expression : expression -> expression = fun { expression_desc = _x0;comment = _x1} -> let _x0 = _self#expression_desc _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in {expression_desc = _x0;comment = _x1} +method statement : statement -> statement = fun { statement_desc = _x0;comment = _x1} -> let _x0 = _self#statement_desc _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in {statement_desc = _x0;comment = _x1} +method variable_declaration : variable_declaration -> variable_declaration = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _x0 = _self#ident _x0 in +let _x1 = _self#option (fun _self -> _self#expression) _x1 in {ident = _x0;value = _x1;property = _x2;ident_info = _x3} +method string_clause : string_clause -> string_clause = fun ( _x0,_x1) -> let _x1 = _self#case_clause _x1 in _x0,_x1 +method int_clause : int_clause -> int_clause = fun ( _x0,_x1) -> let _x1 = _self#case_clause _x1 in _x0,_x1 +method case_clause : case_clause -> case_clause = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _x0 = _self#block _x0 in +let _x2 = _self#option (fun _self -> unknown) _x2 in {switch_body = _x0;should_break = _x1;comment = _x2} +method block : block -> block = _self#list (fun _self -> _self#statement) +method program : program -> program = fun { block = _x0;exports = _x1;export_set = _x2} -> let _x0 = _self#block _x0 in {block = _x0;exports = _x1;export_set = _x2} +method deps_program : deps_program -> deps_program = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _x0 = _self#program _x0 in +let _x1 = _self#required_modules _x1 in +let _x2 = _self#option (fun _self -> unknown) _x2 in {program = _x0;modules = _x1;side_effect = _x2} end end @@ -101955,8 +101797,8 @@ type meta_info = let mark_dead_code (js : J.program) : J.program = let ident_use_stats : meta_info Hash_ident.t = Hash_ident.create 17 in - let mark_dead : Js_fold.fold = object (self) - inherit Js_fold.fold + let mark_dead : Js_iter.iter = object (self) + inherit Js_iter.iter method! ident ident = (match Hash_ident.find_opt ident_use_stats ident with | None -> (* First time *) @@ -101965,14 +101807,13 @@ let mark_dead_code (js : J.program) : J.program = | Some Recursive -> () | Some (Info x) -> Js_op_util.update_used_stats x Used ) - ; self method! variable_declaration vd = match vd.ident_info.used_stats with | Dead_pure - -> self + -> () | Dead_non_pure -> begin match vd.value with - | None -> self + | None -> () | Some x -> self#expression x end | _ -> @@ -101980,7 +101821,7 @@ let mark_dead_code (js : J.program) : J.program = let pure = match value with | None -> true - | Some x -> ignore (self#expression x); Js_analyzer.no_side_effect_expression x in + | Some x -> (self#expression x); Js_analyzer.no_side_effect_expression x in ( let () = if Set_ident.mem js.export_set ident then @@ -101999,9 +101840,9 @@ let mark_dead_code (js : J.program) : J.program = | None -> (* First time *) Hash_ident.add ident_use_stats ident (Info ident_info); Js_op_util.update_used_stats ident_info - (if pure then Scanning_pure else Scanning_non_pure)); self + (if pure then Scanning_pure else Scanning_non_pure)) end in - let _ = (mark_dead#program js) in + let () = (mark_dead#program js) in Hash_ident.iter ident_use_stats (fun _id (info : meta_info) -> match info with | Info ({used_stats = Scanning_pure} as info) -> @@ -102180,6 +102021,204 @@ let program (js : J.program) = since the benefit is not obvious *) +end +module Js_fold += struct +#1 "js_fold.ml" + + open J + let [@inline] unknown _self _ = _self + class fold = + object ((_self : 'self_type)) + method option : + 'a. ('self_type -> 'a -> 'self_type) -> 'a option -> 'self_type = + fun _f_a -> function | None -> _self | Some _x -> let _self = _f_a _self _x in _self + method list : + 'a. ('self_type -> 'a -> 'self_type) -> 'a list -> 'self_type = + fun _f_a -> + function + | [] -> _self + | _x :: _x_i1 -> let _self = _f_a _self _x in let _self = _self#list _f_a _x_i1 in _self + method label : label -> 'self_type = unknown _self +method required_modules : required_modules -> 'self_type = _self#list (fun _self -> _self#module_id) +method ident : ident -> 'self_type = unknown _self +method module_id : module_id -> 'self_type = fun { id = _x0;kind = _x1} -> let _self = _self#ident _x0 in _self +method vident : vident -> 'self_type = function +| Id ( _x0) -> +let _self = _self#ident _x0 in + _self +|Qualified ( _x0,_x1) -> +let _self = _self#module_id _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in + _self +method exception_ident : exception_ident -> 'self_type = _self#ident +method for_ident : for_ident -> 'self_type = _self#ident +method for_direction : for_direction -> 'self_type = unknown _self +method property_map : property_map -> 'self_type = _self#list (fun _self -> fun ( _x0,_x1) -> let _self = _self#expression _x1 in _self) +method length_object : length_object -> 'self_type = unknown _self +method expression_desc : expression_desc -> 'self_type = function +| Length ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#length_object _x1 in + _self +|Char_of_int ( _x0) -> +let _self = _self#expression _x0 in + _self +|Char_to_int ( _x0) -> +let _self = _self#expression _x0 in + _self +|Is_null_or_undefined ( _x0) -> +let _self = _self#expression _x0 in + _self +|String_append ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Bool _ -> _self +|Typeof ( _x0) -> +let _self = _self#expression _x0 in + _self +|Js_not ( _x0) -> +let _self = _self#expression _x0 in + _self +|Seq ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Cond ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in +let _self = _self#expression _x2 in + _self +|Bin ( _x0,_x1,_x2) -> +let _self = _self#expression _x1 in +let _self = _self#expression _x2 in + _self +|FlatCall ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Call ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#expression) _x1 in + _self +|String_index ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Array_index ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Static_index ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#option (fun _self -> unknown _self) _x2 in + _self +|New ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 in + _self +|Var ( _x0) -> +let _self = _self#vident _x0 in + _self +|Fun ( _x0,_x1,_x2,_x3) -> +let _self = _self#list (fun _self -> _self#ident) _x1 in +let _self = _self#block _x2 in + _self +|Str _ -> _self +|Unicode _ -> _self +|Raw_js_code _ -> _self +|Array ( _x0,_x1) -> +let _self = _self#list (fun _self -> _self#expression) _x0 in + _self +|Optional_block ( _x0,_x1) -> +let _self = _self#expression _x0 in + _self +|Caml_block ( _x0,_x1,_x2,_x3) -> +let _self = _self#list (fun _self -> _self#expression) _x0 in +let _self = _self#expression _x2 in + _self +|Caml_block_tag ( _x0) -> +let _self = _self#expression _x0 in + _self +|Number _ -> _self +|Object ( _x0) -> +let _self = _self#property_map _x0 in + _self +|Undefined -> _self +|Null -> _self +method for_ident_expression : for_ident_expression -> 'self_type = _self#expression +method finish_ident_expression : finish_ident_expression -> 'self_type = _self#expression +method statement_desc : statement_desc -> 'self_type = function +| Block ( _x0) -> +let _self = _self#block _x0 in + _self +|Variable ( _x0) -> +let _self = _self#variable_declaration _x0 in + _self +|Exp ( _x0) -> +let _self = _self#expression _x0 in + _self +|If ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#block _x1 in +let _self = _self#block _x2 in + _self +|While ( _x0,_x1,_x2,_x3) -> +let _self = _self#option (fun _self -> _self#label) _x0 in +let _self = _self#expression _x1 in +let _self = _self#block _x2 in + _self +|ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> +let _self = _self#option (fun _self -> _self#for_ident_expression) _x0 in +let _self = _self#finish_ident_expression _x1 in +let _self = _self#for_ident _x2 in +let _self = _self#for_direction _x3 in +let _self = _self#block _x4 in + _self +|Continue ( _x0) -> +let _self = _self#label _x0 in + _self +|Break -> _self +|Return ( _x0) -> +let _self = _self#expression _x0 in + _self +|Int_switch ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#int_clause) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|String_switch ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#string_clause) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|Throw ( _x0) -> +let _self = _self#expression _x0 in + _self +|Try ( _x0,_x1,_x2) -> +let _self = _self#block _x0 in +let _self = _self#option (fun _self -> fun ( _x0,_x1) -> let _self = _self#exception_ident _x0 in let _self = _self#block _x1 in _self) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|Debugger -> _self +method expression : expression -> 'self_type = fun { expression_desc = _x0;comment = _x1} -> let _self = _self#expression_desc _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in _self +method statement : statement -> 'self_type = fun { statement_desc = _x0;comment = _x1} -> let _self = _self#statement_desc _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in _self +method variable_declaration : variable_declaration -> 'self_type = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _self = _self#ident _x0 in +let _self = _self#option (fun _self -> _self#expression) _x1 in _self +method string_clause : string_clause -> 'self_type = fun ( _x0,_x1) -> let _self = _self#case_clause _x1 in _self +method int_clause : int_clause -> 'self_type = fun ( _x0,_x1) -> let _self = _self#case_clause _x1 in _self +method case_clause : case_clause -> 'self_type = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _self = _self#block _x0 in +let _self = _self#option (fun _self -> unknown _self) _x2 in _self +method block : block -> 'self_type = _self#list (fun _self -> _self#statement) +method program : program -> 'self_type = fun { block = _x0;exports = _x1;export_set = _x2} -> let _self = _self#block _x0 in _self +method deps_program : deps_program -> 'self_type = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _self = _self#program _x0 in +let _self = _self#required_modules _x1 in +let _self = _self#option (fun _self -> unknown _self) _x2 in _self + end + end module Js_pass_scope : sig #1 "js_pass_scope.mli" @@ -102632,22 +102671,19 @@ let count_collects (* collect used status*) (stats : int Hash_ident.t) (* collect all def sites *) - (defined_idents : J.variable_declaration Hash_ident.t) : Js_fold.fold + (defined_idents : J.variable_declaration Hash_ident.t) : Js_iter.iter = object (self) - inherit Js_fold.fold - + inherit Js_iter.iter method! variable_declaration ({ident; value ; property = _ ; ident_info = _} as v) = Hash_ident.add defined_idents ident v; match value with - | None -> - self + | None -> () | Some x -> self#expression x - method! ident id = add_use stats id; self - + method! ident id = add_use stats id end @@ -102656,7 +102692,7 @@ let get_stats (program : J.program) : J.variable_declaration Hash_ident.t let stats : int Hash_ident.t = Hash_ident.create 83 in let defined_idents : J.variable_declaration Hash_ident.t = Hash_ident.create 83 in let my_export_set = program.export_set in - let _ : Js_fold.fold = (count_collects stats defined_idents) #program program in + (count_collects stats defined_idents) #program program; post_process_stats my_export_set defined_idents stats end diff --git a/lib/4.06.1/unstable/js_refmt_compiler.ml.d b/lib/4.06.1/unstable/js_refmt_compiler.ml.d index f61773a895..9734cc6b03 100644 --- a/lib/4.06.1/unstable/js_refmt_compiler.ml.d +++ b/lib/4.06.1/unstable/js_refmt_compiler.ml.d @@ -182,6 +182,7 @@ ../lib/4.06.1/unstable/js_refmt_compiler.ml: ./core/js_fold_basic.mli ../lib/4.06.1/unstable/js_refmt_compiler.ml: ./core/js_fun_env.ml ../lib/4.06.1/unstable/js_refmt_compiler.ml: ./core/js_fun_env.mli +../lib/4.06.1/unstable/js_refmt_compiler.ml: ./core/js_iter.ml ../lib/4.06.1/unstable/js_refmt_compiler.ml: ./core/js_long.ml ../lib/4.06.1/unstable/js_refmt_compiler.ml: ./core/js_long.mli ../lib/4.06.1/unstable/js_refmt_compiler.ml: ./core/js_map.ml diff --git a/lib/4.06.1/whole_compiler.ml b/lib/4.06.1/whole_compiler.ml index 59d58a59ba..d67b4a2ad0 100644 --- a/lib/4.06.1/whole_compiler.ml +++ b/lib/4.06.1/whole_compiler.ml @@ -295159,7 +295159,7 @@ val module_data : end = struct #1 "builtin_cmi_datasets.ml" -(* 180a946f426a7bdebc6e18e32d9734eb *) +(* 0de2b622a7d93a9203358884b6dfb0cf *) let module_names : string array = Obj.magic ( "Js" (* 5875 *), "Arg" (* 4085 *), @@ -295188,7 +295188,7 @@ let module_names : string array = Obj.magic ( "Digest" (* 1335 *), "Format" (* 16006 *), "Genlex" (* 726 *), -"Js_exn" (* 1364 *), +"Js_exn" (* 1432 *), "Js_int" (* 1273 *), "Js_obj" (* 677 *), "Lexing" (* 3084 *), @@ -295311,7 +295311,7 @@ let module_data : string array = Obj.magic ( (* Digest *) "\132\149\166\190\000\000\005#\000\000\001 \000\000\004\006\000\000\003\215\192&Digest\160\177\176\001\004\186!t@\b\000\000,\000@@@A\144\176\179\144\176O&string@@\144@\002\005\245\225\000\000\254@@\176\192&_none_A@\000\255\004\002A@@\160@@A\160\160\176\001\004\187'compare@\192\176\193@\176\179\144\004\024@\144@\002\005\245\225\000\000\249\176\193@\176\179\004\006@\144@\002\005\245\225\000\000\250\176\179\144\176A#int@@\144@\002\005\245\225\000\000\251@\002\005\245\225\000\000\252@\002\005\245\225\000\000\253@\004\026@\160\160\176\001\004\188%equal@\192\176\193@\176\179\004\022@\144@\002\005\245\225\000\000\244\176\193@\176\179\004\027@\144@\002\005\245\225\000\000\245\176\179\144\176E$bool@@\144@\002\005\245\225\000\000\246@\002\005\245\225\000\000\247@\002\005\245\225\000\000\248@\004/@\160\160\176\001\004\189&string@\192\176\193@\176\179\144\004<@\144@\002\005\245\225\000\000\241\176\179\004/@\144@\002\005\245\225\000\000\242@\002\005\245\225\000\000\243@\004=@\160\160\176\001\004\190%bytes@\192\176\193@\176\179\144\176C%bytes@@\144@\002\005\245\225\000\000\238\176\179\004?@\144@\002\005\245\225\000\000\239@\002\005\245\225\000\000\240@\004M@\160\160\176\001\004\191)substring@\192\176\193@\176\179\144\004Z@\144@\002\005\245\225\000\000\231\176\193@\176\179\144\004F@\144@\002\005\245\225\000\000\232\176\193@\176\179\144\004L@\144@\002\005\245\225\000\000\233\176\179\004Y@\144@\002\005\245\225\000\000\234@\002\005\245\225\000\000\235@\002\005\245\225\000\000\236@\002\005\245\225\000\000\237@\004g@\160\160\176\001\004\192(subbytes@\192\176\193@\176\179\144\004*@\144@\002\005\245\225\000\000\224\176\193@\176\179\144\004`@\144@\002\005\245\225\000\000\225\176\193@\176\179\144\004f@\144@\002\005\245\225\000\000\226\176\179\004s@\144@\002\005\245\225\000\000\227@\002\005\245\225\000\000\228@\002\005\245\225\000\000\229@\002\005\245\225\000\000\230@\004\129@\160\160\176\001\004\193'channel@\192\176\193@\176\179\177\144\176@*PervasivesA*in_channel\000\255@\144@\002\005\245\225\000\000\219\176\193@\176\179\144\004~@\144@\002\005\245\225\000\000\220\176\179\004\139@\144@\002\005\245\225\000\000\221@\002\005\245\225\000\000\222@\002\005\245\225\000\000\223\144\224-caml_md5_chanBA \160@\160@@@\004\159@\160\160\176\001\004\194$file@\192\176\193@\176\179\144\004\172@\144@\002\005\245\225\000\000\216\176\179\004\159@\144@\002\005\245\225\000\000\217@\002\005\245\225\000\000\218@\004\173@\160\160\176\001\004\195&output@\192\176\193@\176\179\177\004,+out_channel\000\255@\144@\002\005\245\225\000\000\211\176\193@\176\179\004\176@\144@\002\005\245\225\000\000\212\176\179\144\176F$unit@@\144@\002\005\245\225\000\000\213@\002\005\245\225\000\000\214@\002\005\245\225\000\000\215@\004\196@\160\160\176\001\004\196%input@\192\176\193@\176\179\177\004C*in_channel\000\255@\144@\002\005\245\225\000\000\208\176\179\004\197@\144@\002\005\245\225\000\000\209@\002\005\245\225\000\000\210@\004\211@\160\160\176\001\004\197&to_hex@\192\176\193@\176\179\004\207@\144@\002\005\245\225\000\000\205\176\179\144\004\227@\144@\002\005\245\225\000\000\206@\002\005\245\225\000\000\207@\004\225@\160\160\176\001\004\198(from_hex@\192\176\193@\176\179\144\004\238@\144@\002\005\245\225\000\000\202\176\179\004\225@\144@\002\005\245\225\000\000\203@\002\005\245\225\000\000\204@\004\239@@\160\160&Digest\1440g\162\017DR\249\130\170t\240z\140\164sCu\160\160*Pervasives\1440\161\171\015\212m\226s\245\200\018\157M:VVF\160\160\"Js\14409\154\"!\241\252\216]\177\145cA\131\028\026\200\160\1608CamlinternalFormatBasics\1440\176\204G\0192\227\021\136k\159\234\t\245:us\160\160.Bs_stdlib_mini\1440<\2522V\168\021\178\216\170\252z\175\016r\000\000\012x\000\000,\156\000\000+\012\192&Format\160\177\176\001\004\146)formatter@\b\000\000,\000@@@A@@@\176\192&_none_A@\000\255\004\002A@@\160@@A\160\160\176\001\004\147+pp_open_box@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\250\176\193@\176\179\144\176A#int@@\144@\002\005\245\225\000\000\251\176\179\144\176F$unit@@\144@\002\005\245\225\000\000\252@\002\005\245\225\000\000\253@\002\005\245\225\000\000\254@\004\029@\160\160\176\001\004\148(open_box@\192\176\193@\176\179\144\004\019@\144@\002\005\245\225\000\000\247\176\179\144\004\017@\144@\002\005\245\225\000\000\248@\002\005\245\225\000\000\249@\004,@\160\160\176\001\004\149,pp_close_box@\192\176\193@\176\179\004(@\144@\002\005\245\225\000\000\242\176\193@\176\179\144\004!@\144@\002\005\245\225\000\000\243\176\179\144\004%@\144@\002\005\245\225\000\000\244@\002\005\245\225\000\000\245@\002\005\245\225\000\000\246@\004@@\160\160\176\001\004\150)close_box@\192\176\193@\176\179\144\0040@\144@\002\005\245\225\000\000\239\176\179\144\0044@\144@\002\005\245\225\000\000\240@\002\005\245\225\000\000\241@\004O@\160\160\176\001\004\151,pp_open_hbox@\192\176\193@\176\179\004K@\144@\002\005\245\225\000\000\234\176\193@\176\179\144\004D@\144@\002\005\245\225\000\000\235\176\179\144\004H@\144@\002\005\245\225\000\000\236@\002\005\245\225\000\000\237@\002\005\245\225\000\000\238@\004c@\160\160\176\001\004\152)open_hbox@\192\176\193@\176\179\144\004S@\144@\002\005\245\225\000\000\231\176\179\144\004W@\144@\002\005\245\225\000\000\232@\002\005\245\225\000\000\233@\004r@\160\160\176\001\004\153,pp_open_vbox@\192\176\193@\176\179\004n@\144@\002\005\245\225\000\000\226\176\193@\176\179\144\004m@\144@\002\005\245\225\000\000\227\176\179\144\004k@\144@\002\005\245\225\000\000\228@\002\005\245\225\000\000\229@\002\005\245\225\000\000\230@\004\134@\160\160\176\001\004\154)open_vbox@\192\176\193@\176\179\144\004|@\144@\002\005\245\225\000\000\223\176\179\144\004z@\144@\002\005\245\225\000\000\224@\002\005\245\225\000\000\225@\004\149@\160\160\176\001\004\155-pp_open_hvbox@\192\176\193@\176\179\004\145@\144@\002\005\245\225\000\000\218\176\193@\176\179\144\004\144@\144@\002\005\245\225\000\000\219\176\179\144\004\142@\144@\002\005\245\225\000\000\220@\002\005\245\225\000\000\221@\002\005\245\225\000\000\222@\004\169@\160\160\176\001\004\156*open_hvbox@\192\176\193@\176\179\144\004\159@\144@\002\005\245\225\000\000\215\176\179\144\004\157@\144@\002\005\245\225\000\000\216@\002\005\245\225\000\000\217@\004\184@\160\160\176\001\004\157.pp_open_hovbox@\192\176\193@\176\179\004\180@\144@\002\005\245\225\000\000\210\176\193@\176\179\144\004\179@\144@\002\005\245\225\000\000\211\176\179\144\004\177@\144@\002\005\245\225\000\000\212@\002\005\245\225\000\000\213@\002\005\245\225\000\000\214@\004\204@\160\160\176\001\004\158+open_hovbox@\192\176\193@\176\179\144\004\194@\144@\002\005\245\225\000\000\207\176\179\144\004\192@\144@\002\005\245\225\000\000\208@\002\005\245\225\000\000\209@\004\219@\160\160\176\001\004\159/pp_print_string@\192\176\193@\176\179\004\215@\144@\002\005\245\225\000\000\202\176\193@\176\179\144\176O&string@@\144@\002\005\245\225\000\000\203\176\179\144\004\214@\144@\002\005\245\225\000\000\204@\002\005\245\225\000\000\205@\002\005\245\225\000\000\206@\004\241@\160\160\176\001\004\160,print_string@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\199\176\179\144\004\229@\144@\002\005\245\225\000\000\200@\002\005\245\225\000\000\201@\005\001\000@\160\160\176\001\004\161+pp_print_as@\192\176\193@\176\179\004\252@\144@\002\005\245\225\000\000\192\176\193@\176\179\144\004\251@\144@\002\005\245\225\000\000\193\176\193@\176\179\144\004+@\144@\002\005\245\225\000\000\194\176\179\144\004\255@\144@\002\005\245\225\000\000\195@\002\005\245\225\000\000\196@\002\005\245\225\000\000\197@\002\005\245\225\000\000\198@\005\001\026@\160\160\176\001\004\162(print_as@\192\176\193@\176\179\144\005\001\016@\144@\002\005\245\225\000\000\187\176\193@\176\179\144\004@@\144@\002\005\245\225\000\000\188\176\179\144\005\001\020@\144@\002\005\245\225\000\000\189@\002\005\245\225\000\000\190@\002\005\245\225\000\000\191@\005\001/@\160\160\176\001\004\163,pp_print_int@\192\176\193@\176\179\005\001+@\144@\002\005\245\225\000\000\182\176\193@\176\179\144\005\001*@\144@\002\005\245\225\000\000\183\176\179\144\005\001(@\144@\002\005\245\225\000\000\184@\002\005\245\225\000\000\185@\002\005\245\225\000\000\186@\005\001C@\160\160\176\001\004\164)print_int@\192\176\193@\176\179\144\005\0019@\144@\002\005\245\225\000\000\179\176\179\144\005\0017@\144@\002\005\245\225\000\000\180@\002\005\245\225\000\000\181@\005\001R@\160\160\176\001\004\165.pp_print_float@\192\176\193@\176\179\005\001N@\144@\002\005\245\225\000\000\174\176\193@\176\179\144\176D%float@@\144@\002\005\245\225\000\000\175\176\179\144\005\001M@\144@\002\005\245\225\000\000\176@\002\005\245\225\000\000\177@\002\005\245\225\000\000\178@\005\001h@\160\160\176\001\004\166+print_float@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\171\176\179\144\005\001\\@\144@\002\005\245\225\000\000\172@\002\005\245\225\000\000\173@\005\001w@\160\160\176\001\004\167-pp_print_char@\192\176\193@\176\179\005\001s@\144@\002\005\245\225\000\000\166\176\193@\176\179\144\176B$char@@\144@\002\005\245\225\000\000\167\176\179\144\005\001r@\144@\002\005\245\225\000\000\168@\002\005\245\225\000\000\169@\002\005\245\225\000\000\170@\005\001\141@\160\160\176\001\004\168*print_char@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\163\176\179\144\005\001\129@\144@\002\005\245\225\000\000\164@\002\005\245\225\000\000\165@\005\001\156@\160\160\176\001\004\169-pp_print_bool@\192\176\193@\176\179\005\001\152@\144@\002\005\245\225\000\000\158\176\193@\176\179\144\176E$bool@@\144@\002\005\245\225\000\000\159\176\179\144\005\001\151@\144@\002\005\245\225\000\000\160@\002\005\245\225\000\000\161@\002\005\245\225\000\000\162@\005\001\178@\160\160\176\001\004\170*print_bool@\192\176\193@\176\179\144\004\017@\144@\002\005\245\225\000\000\155\176\179\144\005\001\166@\144@\002\005\245\225\000\000\156@\002\005\245\225\000\000\157@\005\001\193@\160\160\176\001\004\171.pp_print_space@\192\176\193@\176\179\005\001\189@\144@\002\005\245\225\000\000\150\176\193@\176\179\144\005\001\182@\144@\002\005\245\225\000\000\151\176\179\144\005\001\186@\144@\002\005\245\225\000\000\152@\002\005\245\225\000\000\153@\002\005\245\225\000\000\154@\005\001\213@\160\160\176\001\004\172+print_space@\192\176\193@\176\179\144\005\001\197@\144@\002\005\245\225\000\000\147\176\179\144\005\001\201@\144@\002\005\245\225\000\000\148@\002\005\245\225\000\000\149@\005\001\228@\160\160\176\001\004\173,pp_print_cut@\192\176\193@\176\179\005\001\224@\144@\002\005\245\225\000\000\142\176\193@\176\179\144\005\001\217@\144@\002\005\245\225\000\000\143\176\179\144\005\001\221@\144@\002\005\245\225\000\000\144@\002\005\245\225\000\000\145@\002\005\245\225\000\000\146@\005\001\248@\160\160\176\001\004\174)print_cut@\192\176\193@\176\179\144\005\001\232@\144@\002\005\245\225\000\000\139\176\179\144\005\001\236@\144@\002\005\245\225\000\000\140@\002\005\245\225\000\000\141@\005\002\007@\160\160\176\001\004\175.pp_print_break@\192\176\193@\176\179\005\002\003@\144@\002\005\245\225\000\000\132\176\193@\176\179\144\005\002\002@\144@\002\005\245\225\000\000\133\176\193@\176\179\144\005\002\b@\144@\002\005\245\225\000\000\134\176\179\144\005\002\006@\144@\002\005\245\225\000\000\135@\002\005\245\225\000\000\136@\002\005\245\225\000\000\137@\002\005\245\225\000\000\138@\005\002!@\160\160\176\001\004\176+print_break@\192\176\193@\176\179\144\005\002\023@\144@\002\005\245\225\000\001\255\127\176\193@\176\179\144\005\002\029@\144@\002\005\245\225\000\000\128\176\179\144\005\002\027@\144@\002\005\245\225\000\000\129@\002\005\245\225\000\000\130@\002\005\245\225\000\000\131@\005\0026@\160\160\176\001\004\1770pp_force_newline@\192\176\193@\176\179\005\0022@\144@\002\005\245\225\000\001\255z\176\193@\176\179\144\005\002+@\144@\002\005\245\225\000\001\255{\176\179\144\005\002/@\144@\002\005\245\225\000\001\255|@\002\005\245\225\000\001\255}@\002\005\245\225\000\001\255~@\005\002J@\160\160\176\001\004\178-force_newline@\192\176\193@\176\179\144\005\002:@\144@\002\005\245\225\000\001\255w\176\179\144\005\002>@\144@\002\005\245\225\000\001\255x@\002\005\245\225\000\001\255y@\005\002Y@\160\160\176\001\004\1793pp_print_if_newline@\192\176\193@\176\179\005\002U@\144@\002\005\245\225\000\001\255r\176\193@\176\179\144\005\002N@\144@\002\005\245\225\000\001\255s\176\179\144\005\002R@\144@\002\005\245\225\000\001\255t@\002\005\245\225\000\001\255u@\002\005\245\225\000\001\255v@\005\002m@\160\160\176\001\004\1800print_if_newline@\192\176\193@\176\179\144\005\002]@\144@\002\005\245\225\000\001\255o\176\179\144\005\002a@\144@\002\005\245\225\000\001\255p@\002\005\245\225\000\001\255q@\005\002|@\160\160\176\001\004\181.pp_print_flush@\192\176\193@\176\179\005\002x@\144@\002\005\245\225\000\001\255j\176\193@\176\179\144\005\002q@\144@\002\005\245\225\000\001\255k\176\179\144\005\002u@\144@\002\005\245\225\000\001\255l@\002\005\245\225\000\001\255m@\002\005\245\225\000\001\255n@\005\002\144@\160\160\176\001\004\182+print_flush@\192\176\193@\176\179\144\005\002\128@\144@\002\005\245\225\000\001\255g\176\179\144\005\002\132@\144@\002\005\245\225\000\001\255h@\002\005\245\225\000\001\255i@\005\002\159@\160\160\176\001\004\1830pp_print_newline@\192\176\193@\176\179\005\002\155@\144@\002\005\245\225\000\001\255b\176\193@\176\179\144\005\002\148@\144@\002\005\245\225\000\001\255c\176\179\144\005\002\152@\144@\002\005\245\225\000\001\255d@\002\005\245\225\000\001\255e@\002\005\245\225\000\001\255f@\005\002\179@\160\160\176\001\004\184-print_newline@\192\176\193@\176\179\144\005\002\163@\144@\002\005\245\225\000\001\255_\176\179\144\005\002\167@\144@\002\005\245\225\000\001\255`@\002\005\245\225\000\001\255a@\005\002\194@\160\160\176\001\004\185-pp_set_margin@\192\176\193@\176\179\005\002\190@\144@\002\005\245\225\000\001\255Z\176\193@\176\179\144\005\002\189@\144@\002\005\245\225\000\001\255[\176\179\144\005\002\187@\144@\002\005\245\225\000\001\255\\@\002\005\245\225\000\001\255]@\002\005\245\225\000\001\255^@\005\002\214@\160\160\176\001\004\186*set_margin@\192\176\193@\176\179\144\005\002\204@\144@\002\005\245\225\000\001\255W\176\179\144\005\002\202@\144@\002\005\245\225\000\001\255X@\002\005\245\225\000\001\255Y@\005\002\229@\160\160\176\001\004\187-pp_get_margin@\192\176\193@\176\179\005\002\225@\144@\002\005\245\225\000\001\255R\176\193@\176\179\144\005\002\218@\144@\002\005\245\225\000\001\255S\176\179\144\005\002\228@\144@\002\005\245\225\000\001\255T@\002\005\245\225\000\001\255U@\002\005\245\225\000\001\255V@\005\002\249@\160\160\176\001\004\188*get_margin@\192\176\193@\176\179\144\005\002\233@\144@\002\005\245\225\000\001\255O\176\179\144\005\002\243@\144@\002\005\245\225\000\001\255P@\002\005\245\225\000\001\255Q@\005\003\b@\160\160\176\001\004\1891pp_set_max_indent@\192\176\193@\176\179\005\003\004@\144@\002\005\245\225\000\001\255J\176\193@\176\179\144\005\003\003@\144@\002\005\245\225\000\001\255K\176\179\144\005\003\001@\144@\002\005\245\225\000\001\255L@\002\005\245\225\000\001\255M@\002\005\245\225\000\001\255N@\005\003\028@\160\160\176\001\004\190.set_max_indent@\192\176\193@\176\179\144\005\003\018@\144@\002\005\245\225\000\001\255G\176\179\144\005\003\016@\144@\002\005\245\225\000\001\255H@\002\005\245\225\000\001\255I@\005\003+@\160\160\176\001\004\1911pp_get_max_indent@\192\176\193@\176\179\005\003'@\144@\002\005\245\225\000\001\255B\176\193@\176\179\144\005\003 @\144@\002\005\245\225\000\001\255C\176\179\144\005\003*@\144@\002\005\245\225\000\001\255D@\002\005\245\225\000\001\255E@\002\005\245\225\000\001\255F@\005\003?@\160\160\176\001\004\192.get_max_indent@\192\176\193@\176\179\144\005\003/@\144@\002\005\245\225\000\001\255?\176\179\144\005\0039@\144@\002\005\245\225\000\001\255@@\002\005\245\225\000\001\255A@\005\003N@\160\160\176\001\004\1930pp_set_max_boxes@\192\176\193@\176\179\005\003J@\144@\002\005\245\225\000\001\255:\176\193@\176\179\144\005\003I@\144@\002\005\245\225\000\001\255;\176\179\144\005\003G@\144@\002\005\245\225\000\001\255<@\002\005\245\225\000\001\255=@\002\005\245\225\000\001\255>@\005\003b@\160\160\176\001\004\194-set_max_boxes@\192\176\193@\176\179\144\005\003X@\144@\002\005\245\225\000\001\2557\176\179\144\005\003V@\144@\002\005\245\225\000\001\2558@\002\005\245\225\000\001\2559@\005\003q@\160\160\176\001\004\1950pp_get_max_boxes@\192\176\193@\176\179\005\003m@\144@\002\005\245\225\000\001\2552\176\193@\176\179\144\005\003f@\144@\002\005\245\225\000\001\2553\176\179\144\005\003p@\144@\002\005\245\225\000\001\2554@\002\005\245\225\000\001\2555@\002\005\245\225\000\001\2556@\005\003\133@\160\160\176\001\004\196-get_max_boxes@\192\176\193@\176\179\144\005\003u@\144@\002\005\245\225\000\001\255/\176\179\144\005\003\127@\144@\002\005\245\225\000\001\2550@\002\005\245\225\000\001\2551@\005\003\148@\160\160\176\001\004\1971pp_over_max_boxes@\192\176\193@\176\179\005\003\144@\144@\002\005\245\225\000\001\255*\176\193@\176\179\144\005\003\137@\144@\002\005\245\225\000\001\255+\176\179\144\005\001\252@\144@\002\005\245\225\000\001\255,@\002\005\245\225\000\001\255-@\002\005\245\225\000\001\255.@\005\003\168@\160\160\176\001\004\198.over_max_boxes@\192\176\193@\176\179\144\005\003\152@\144@\002\005\245\225\000\001\255'\176\179\144\005\002\011@\144@\002\005\245\225\000\001\255(@\002\005\245\225\000\001\255)@\005\003\183@\160\160\176\001\004\199,pp_open_tbox@\192\176\193@\176\179\005\003\179@\144@\002\005\245\225\000\001\255\"\176\193@\176\179\144\005\003\172@\144@\002\005\245\225\000\001\255#\176\179\144\005\003\176@\144@\002\005\245\225\000\001\255$@\002\005\245\225\000\001\255%@\002\005\245\225\000\001\255&@\005\003\203@\160\160\176\001\004\200)open_tbox@\192\176\193@\176\179\144\005\003\187@\144@\002\005\245\225\000\001\255\031\176\179\144\005\003\191@\144@\002\005\245\225\000\001\255 @\002\005\245\225\000\001\255!@\005\003\218@\160\160\176\001\004\201-pp_close_tbox@\192\176\193@\176\179\005\003\214@\144@\002\005\245\225\000\001\255\026\176\193@\176\179\144\005\003\207@\144@\002\005\245\225\000\001\255\027\176\179\144\005\003\211@\144@\002\005\245\225\000\001\255\028@\002\005\245\225\000\001\255\029@\002\005\245\225\000\001\255\030@\005\003\238@\160\160\176\001\004\202*close_tbox@\192\176\193@\176\179\144\005\003\222@\144@\002\005\245\225\000\001\255\023\176\179\144\005\003\226@\144@\002\005\245\225\000\001\255\024@\002\005\245\225\000\001\255\025@\005\003\253@\160\160\176\001\004\203*pp_set_tab@\192\176\193@\176\179\005\003\249@\144@\002\005\245\225\000\001\255\018\176\193@\176\179\144\005\003\242@\144@\002\005\245\225\000\001\255\019\176\179\144\005\003\246@\144@\002\005\245\225\000\001\255\020@\002\005\245\225\000\001\255\021@\002\005\245\225\000\001\255\022@\005\004\017@\160\160\176\001\004\204'set_tab@\192\176\193@\176\179\144\005\004\001@\144@\002\005\245\225\000\001\255\015\176\179\144\005\004\005@\144@\002\005\245\225\000\001\255\016@\002\005\245\225\000\001\255\017@\005\004 @\160\160\176\001\004\205,pp_print_tab@\192\176\193@\176\179\005\004\028@\144@\002\005\245\225\000\001\255\n\176\193@\176\179\144\005\004\021@\144@\002\005\245\225\000\001\255\011\176\179\144\005\004\025@\144@\002\005\245\225\000\001\255\012@\002\005\245\225\000\001\255\r@\002\005\245\225\000\001\255\014@\005\0044@\160\160\176\001\004\206)print_tab@\192\176\193@\176\179\144\005\004$@\144@\002\005\245\225\000\001\255\007\176\179\144\005\004(@\144@\002\005\245\225\000\001\255\b@\002\005\245\225\000\001\255\t@\005\004C@\160\160\176\001\004\207/pp_print_tbreak@\192\176\193@\176\179\005\004?@\144@\002\005\245\225\000\001\255\000\176\193@\176\179\144\005\004>@\144@\002\005\245\225\000\001\255\001\176\193@\176\179\144\005\004D@\144@\002\005\245\225\000\001\255\002\176\179\144\005\004B@\144@\002\005\245\225\000\001\255\003@\002\005\245\225\000\001\255\004@\002\005\245\225\000\001\255\005@\002\005\245\225\000\001\255\006@\005\004]@\160\160\176\001\004\208,print_tbreak@\192\176\193@\176\179\144\005\004S@\144@\002\005\245\225\000\001\254\251\176\193@\176\179\144\005\004Y@\144@\002\005\245\225\000\001\254\252\176\179\144\005\004W@\144@\002\005\245\225\000\001\254\253@\002\005\245\225\000\001\254\254@\002\005\245\225\000\001\254\255@\005\004r@\160\160\176\001\004\2094pp_set_ellipsis_text@\192\176\193@\176\179\005\004n@\144@\002\005\245\225\000\001\254\246\176\193@\176\179\144\005\003\151@\144@\002\005\245\225\000\001\254\247\176\179\144\005\004k@\144@\002\005\245\225\000\001\254\248@\002\005\245\225\000\001\254\249@\002\005\245\225\000\001\254\250@\005\004\134@\160\160\176\001\004\2101set_ellipsis_text@\192\176\193@\176\179\144\005\003\166@\144@\002\005\245\225\000\001\254\243\176\179\144\005\004z@\144@\002\005\245\225\000\001\254\244@\002\005\245\225\000\001\254\245@\005\004\149@\160\160\176\001\004\2114pp_get_ellipsis_text@\192\176\193@\176\179\005\004\145@\144@\002\005\245\225\000\001\254\238\176\193@\176\179\144\005\004\138@\144@\002\005\245\225\000\001\254\239\176\179\144\005\003\190@\144@\002\005\245\225\000\001\254\240@\002\005\245\225\000\001\254\241@\002\005\245\225\000\001\254\242@\005\004\169@\160\160\176\001\004\2121get_ellipsis_text@\192\176\193@\176\179\144\005\004\153@\144@\002\005\245\225\000\001\254\235\176\179\144\005\003\205@\144@\002\005\245\225\000\001\254\236@\002\005\245\225\000\001\254\237@\005\004\184@\160\177\176\001\004\213#tag@\b\000\000,\000@@@A\144\176\179\144\005\003\215@\144@\002\005\245\225\000\001\254\234@@\005\004\194@@\005\004\191A\160\160\176\001\004\214+pp_open_tag@\192\176\193@\176\179\005\004\190@\144@\002\005\245\225\000\001\254\229\176\193@\176\179\144\005\003\231@\144@\002\005\245\225\000\001\254\230\176\179\144\005\004\187@\144@\002\005\245\225\000\001\254\231@\002\005\245\225\000\001\254\232@\002\005\245\225\000\001\254\233@\005\004\214@\160\160\176\001\004\215(open_tag@\192\176\193@\176\179\144\004&@\144@\002\005\245\225\000\001\254\226\176\179\144\005\004\202@\144@\002\005\245\225\000\001\254\227@\002\005\245\225\000\001\254\228@\005\004\229@\160\160\176\001\004\216,pp_close_tag@\192\176\193@\176\179\005\004\225@\144@\002\005\245\225\000\001\254\221\176\193@\176\179\144\005\004\218@\144@\002\005\245\225\000\001\254\222\176\179\144\005\004\222@\144@\002\005\245\225\000\001\254\223@\002\005\245\225\000\001\254\224@\002\005\245\225\000\001\254\225@\005\004\249@\160\160\176\001\004\217)close_tag@\192\176\193@\176\179\144\005\004\233@\144@\002\005\245\225\000\001\254\218\176\179\144\005\004\237@\144@\002\005\245\225\000\001\254\219@\002\005\245\225\000\001\254\220@\005\005\b@\160\160\176\001\004\218+pp_set_tags@\192\176\193@\176\179\005\005\004@\144@\002\005\245\225\000\001\254\213\176\193@\176\179\144\005\003l@\144@\002\005\245\225\000\001\254\214\176\179\144\005\005\001@\144@\002\005\245\225\000\001\254\215@\002\005\245\225\000\001\254\216@\002\005\245\225\000\001\254\217@\005\005\028@\160\160\176\001\004\219(set_tags@\192\176\193@\176\179\144\005\003{@\144@\002\005\245\225\000\001\254\210\176\179\144\005\005\016@\144@\002\005\245\225\000\001\254\211@\002\005\245\225\000\001\254\212@\005\005+@\160\160\176\001\004\2201pp_set_print_tags@\192\176\193@\176\179\005\005'@\144@\002\005\245\225\000\001\254\205\176\193@\176\179\144\005\003\143@\144@\002\005\245\225\000\001\254\206\176\179\144\005\005$@\144@\002\005\245\225\000\001\254\207@\002\005\245\225\000\001\254\208@\002\005\245\225\000\001\254\209@\005\005?@\160\160\176\001\004\221.set_print_tags@\192\176\193@\176\179\144\005\003\158@\144@\002\005\245\225\000\001\254\202\176\179\144\005\0053@\144@\002\005\245\225\000\001\254\203@\002\005\245\225\000\001\254\204@\005\005N@\160\160\176\001\004\2220pp_set_mark_tags@\192\176\193@\176\179\005\005J@\144@\002\005\245\225\000\001\254\197\176\193@\176\179\144\005\003\178@\144@\002\005\245\225\000\001\254\198\176\179\144\005\005G@\144@\002\005\245\225\000\001\254\199@\002\005\245\225\000\001\254\200@\002\005\245\225\000\001\254\201@\005\005b@\160\160\176\001\004\223-set_mark_tags@\192\176\193@\176\179\144\005\003\193@\144@\002\005\245\225\000\001\254\194\176\179\144\005\005V@\144@\002\005\245\225\000\001\254\195@\002\005\245\225\000\001\254\196@\005\005q@\160\160\176\001\004\2241pp_get_print_tags@\192\176\193@\176\179\005\005m@\144@\002\005\245\225\000\001\254\189\176\193@\176\179\144\005\005f@\144@\002\005\245\225\000\001\254\190\176\179\144\005\003\217@\144@\002\005\245\225\000\001\254\191@\002\005\245\225\000\001\254\192@\002\005\245\225\000\001\254\193@\005\005\133@\160\160\176\001\004\225.get_print_tags@\192\176\193@\176\179\144\005\005u@\144@\002\005\245\225\000\001\254\186\176\179\144\005\003\232@\144@\002\005\245\225\000\001\254\187@\002\005\245\225\000\001\254\188@\005\005\148@\160\160\176\001\004\2260pp_get_mark_tags@\192\176\193@\176\179\005\005\144@\144@\002\005\245\225\000\001\254\181\176\193@\176\179\144\005\005\137@\144@\002\005\245\225\000\001\254\182\176\179\144\005\003\252@\144@\002\005\245\225\000\001\254\183@\002\005\245\225\000\001\254\184@\002\005\245\225\000\001\254\185@\005\005\168@\160\160\176\001\004\227-get_mark_tags@\192\176\193@\176\179\144\005\005\152@\144@\002\005\245\225\000\001\254\178\176\179\144\005\004\011@\144@\002\005\245\225\000\001\254\179@\002\005\245\225\000\001\254\180@\005\005\183@\160\160\176\001\004\228set_formatter_output_functions@\192\176\193@\176\193@\176\179\144\005\0056@\144@\002\005\245\225\000\001\254\142\176\193@\176\179\144\005\006\018@\144@\002\005\245\225\000\001\254\143\176\193@\176\179\144\005\006\024@\144@\002\005\245\225\000\001\254\144\176\179\144\005\006\022@\144@\002\005\245\225\000\001\254\145@\002\005\245\225\000\001\254\146@\002\005\245\225\000\001\254\147@\002\005\245\225\000\001\254\148\176\193@\176\193@\176\179\144\005\006\030@\144@\002\005\245\225\000\001\254\149\176\179\144\005\006\"@\144@\002\005\245\225\000\001\254\150@\002\005\245\225\000\001\254\151\176\179\144\005\006&@\144@\002\005\245\225\000\001\254\152@\002\005\245\225\000\001\254\153@\002\005\245\225\000\001\254\154@\005\006A@\160\160\176\001\004\232\t!pp_get_formatter_output_functions@\192\176\193@\176\179\005\006=@\144@\002\005\245\225\000\001\254\127\176\193@\176\179\144\005\0066@\144@\002\005\245\225\000\001\254\128\176\146\160\176\193@\176\179\144\005\005o@\144@\002\005\245\225\000\001\254\132\176\193@\176\179\144\005\006K@\144@\002\005\245\225\000\001\254\133\176\193@\176\179\144\005\006Q@\144@\002\005\245\225\000\001\254\134\176\179\144\005\006O@\144@\002\005\245\225\000\001\254\135@\002\005\245\225\000\001\254\136@\002\005\245\225\000\001\254\137@\002\005\245\225\000\001\254\138\160\176\193@\176\179\144\005\006V@\144@\002\005\245\225\000\001\254\129\176\179\144\005\006Z@\144@\002\005\245\225\000\001\254\130@\002\005\245\225\000\001\254\131@\002\005\245\225\000\001\254\139@\002\005\245\225\000\001\254\140@\002\005\245\225\000\001\254\141@\005\006u@\160\160\176\001\004\233>get_formatter_output_functions@\192\176\193@\176\179\144\005\006e@\144@\002\005\245\225\000\001\254r\176\146\160\176\193@\176\179\144\005\005\158@\144@\002\005\245\225\000\001\254v\176\193@\176\179\144\005\006z@\144@\002\005\245\225\000\001\254w\176\193@\176\179\144\005\006\128@\144@\002\005\245\225\000\001\254x\176\179\144\005\006~@\144@\002\005\245\225\000\001\254y@\002\005\245\225\000\001\254z@\002\005\245\225\000\001\254{@\002\005\245\225\000\001\254|\160\176\193@\176\179\144\005\006\133@\144@\002\005\245\225\000\001\254s\176\179\144\005\006\137@\144@\002\005\245\225\000\001\254t@\002\005\245\225\000\001\254u@\002\005\245\225\000\001\254}@\002\005\245\225\000\001\254~@\005\006\164@\160\177\176\001\004\2347formatter_out_functions@\b\000\000,\000@@\160\160\208\176\001\004C*out_string@@\176\193@\176\179\144\005\005\201@\144@\002\005\245\225\000\001\254k\176\193@\176\179\144\005\006\165@\144@\002\005\245\225\000\001\254l\176\193@\176\179\144\005\006\171@\144@\002\005\245\225\000\001\254m\176\179\144\005\006\169@\144@\002\005\245\225\000\001\254n@\002\005\245\225\000\001\254o@\002\005\245\225\000\001\254p@\002\005\245\225\000\001\254q\005\006\196@\160\208\176\001\004D)out_flush@@\176\193@\176\179\144\005\006\179@\144@\002\005\245\225\000\001\254h\176\179\144\005\006\183@\144@\002\005\245\225\000\001\254i@\002\005\245\225\000\001\254j\005\006\210@\160\208\176\001\004E+out_newline@@\176\193@\176\179\144\005\006\193@\144@\002\005\245\225\000\001\254e\176\179\144\005\006\197@\144@\002\005\245\225\000\001\254f@\002\005\245\225\000\001\254g\005\006\224@\160\208\176\001\004F*out_spaces@@\176\193@\176\179\144\005\006\213@\144@\002\005\245\225\000\001\254b\176\179\144\005\006\211@\144@\002\005\245\225\000\001\254c@\002\005\245\225\000\001\254d\005\006\238@\160\208\176\001\004G*out_indent@@\176\193@\176\179\144\005\006\227@\144@\002\005\245\225\000\001\254_\176\179\144\005\006\225@\144@\002\005\245\225\000\001\254`@\002\005\245\225\000\001\254a\005\006\252@@@A@@@\005\006\252@@\005\006\249A\160\160\176\001\004\235>pp_set_formatter_out_functions@\192\176\193@\176\179\005\006\248@\144@\002\005\245\225\000\001\254Z\176\193@\176\179\144\004e@\144@\002\005\245\225\000\001\254[\176\179\144\005\006\245@\144@\002\005\245\225\000\001\254\\@\002\005\245\225\000\001\254]@\002\005\245\225\000\001\254^@\005\007\016@\160\160\176\001\004\236;set_formatter_out_functions@\192\176\193@\176\179\004\015@\144@\002\005\245\225\000\001\254W\176\179\144\005\007\003@\144@\002\005\245\225\000\001\254X@\002\005\245\225\000\001\254Y@\005\007\030@\160\160\176\001\004\237>pp_get_formatter_out_functions@\192\176\193@\176\179\005\007\026@\144@\002\005\245\225\000\001\254R\176\193@\176\179\144\005\007\019@\144@\002\005\245\225\000\001\254S\176\179\004&@\144@\002\005\245\225\000\001\254T@\002\005\245\225\000\001\254U@\002\005\245\225\000\001\254V@\005\0071@\160\160\176\001\004\238;get_formatter_out_functions@\192\176\193@\176\179\144\005\007!@\144@\002\005\245\225\000\001\254O\176\179\0044@\144@\002\005\245\225\000\001\254P@\002\005\245\225\000\001\254Q@\005\007?@\160\177\176\001\004\2397formatter_tag_functions@\b\000\000,\000@@\160\160\208\176\001\004M-mark_open_tag@@\176\193@\176\179\005\002n@\144@\002\005\245\225\000\001\254L\176\179\144\005\006g@\144@\002\005\245\225\000\001\254M@\002\005\245\225\000\001\254N\005\007R@\160\208\176\001\004N.mark_close_tag@@\176\193@\176\179\005\002{@\144@\002\005\245\225\000\001\254I\176\179\144\005\006t@\144@\002\005\245\225\000\001\254J@\002\005\245\225\000\001\254K\005\007_@\160\208\176\001\004O.print_open_tag@@\176\193@\176\179\005\002\136@\144@\002\005\245\225\000\001\254F\176\179\144\005\007Q@\144@\002\005\245\225\000\001\254G@\002\005\245\225\000\001\254H\005\007l@\160\208\176\001\004P/print_close_tag@@\176\193@\176\179\005\002\149@\144@\002\005\245\225\000\001\254C\176\179\144\005\007^@\144@\002\005\245\225\000\001\254D@\002\005\245\225\000\001\254E\005\007y@@@A@@@\005\007y@@\005\007vA\160\160\176\001\004\240>pp_set_formatter_tag_functions@\192\176\193@\176\179\005\007u@\144@\002\005\245\225\000\001\254>\176\193@\176\179\144\004G@\144@\002\005\245\225\000\001\254?\176\179\144\005\007r@\144@\002\005\245\225\000\001\254@@\002\005\245\225\000\001\254A@\002\005\245\225\000\001\254B@\005\007\141@\160\160\176\001\004\241;set_formatter_tag_functions@\192\176\193@\176\179\004\015@\144@\002\005\245\225\000\001\254;\176\179\144\005\007\128@\144@\002\005\245\225\000\001\254<@\002\005\245\225\000\001\254=@\005\007\155@\160\160\176\001\004\242>pp_get_formatter_tag_functions@\192\176\193@\176\179\005\007\151@\144@\002\005\245\225\000\001\2546\176\193@\176\179\144\005\007\144@\144@\002\005\245\225\000\001\2547\176\179\004&@\144@\002\005\245\225\000\001\2548@\002\005\245\225\000\001\2549@\002\005\245\225\000\001\254:@\005\007\174@\160\160\176\001\004\243;get_formatter_tag_functions@\192\176\193@\176\179\144\005\007\158@\144@\002\005\245\225\000\001\2543\176\179\0044@\144@\002\005\245\225\000\001\2544@\002\005\245\225\000\001\2545@\005\007\188@\160\160\176\001\004\2448formatter_of_out_channel@\192\176\193@\176\179\177\144\176@*PervasivesA+out_channel\000\255@\144@\002\005\245\225\000\001\2540\176\179\005\007\192@\144@\002\005\245\225\000\001\2541@\002\005\245\225\000\001\2542@\005\007\206@\160\160\176\001\004\245-std_formatter@\192\176\179\005\007\200@\144@\002\005\245\225\000\001\254/@\005\007\214@\160\160\176\001\004\246-err_formatter@\192\176\179\005\007\208@\144@\002\005\245\225\000\001\254.@\005\007\222@\160\160\176\001\004\2473formatter_of_buffer@\192\176\193@\176\179\177\144\176@&BufferA!t\000\255@\144@\002\005\245\225\000\001\254+\176\179\005\007\226@\144@\002\005\245\225\000\001\254,@\002\005\245\225\000\001\254-@\005\007\240@\160\160\176\001\004\248&stdbuf@\192\176\179\177\144\176@&BufferA!t\000\255@\144@\002\005\245\225\000\001\254*@\005\007\253@\160\160\176\001\004\249-str_formatter@\192\176\179\005\007\247@\144@\002\005\245\225\000\001\254)@\005\b\005@\160\160\176\001\004\2503flush_str_formatter@\192\176\193@\176\179\144\005\007\245@\144@\002\005\245\225\000\001\254&\176\179\144\005\007)@\144@\002\005\245\225\000\001\254'@\002\005\245\225\000\001\254(@\005\b\020@\160\160\176\001\004\251.make_formatter@\192\176\193@\176\193@\176\179\144\005\0076@\144@\002\005\245\225\000\001\254\025\176\193@\176\179\144\005\b\018@\144@\002\005\245\225\000\001\254\026\176\193@\176\179\144\005\b\024@\144@\002\005\245\225\000\001\254\027\176\179\144\005\b\022@\144@\002\005\245\225\000\001\254\028@\002\005\245\225\000\001\254\029@\002\005\245\225\000\001\254\030@\002\005\245\225\000\001\254\031\176\193@\176\193@\176\179\144\005\b\030@\144@\002\005\245\225\000\001\254 \176\179\144\005\b\"@\144@\002\005\245\225\000\001\254!@\002\005\245\225\000\001\254\"\176\179\005\b2@\144@\002\005\245\225\000\001\254#@\002\005\245\225\000\001\254$@\002\005\245\225\000\001\254%@\005\b@@\160\160\176\001\004\252:formatter_of_out_functions@\192\176\193@\176\179\005\001?@\144@\002\005\245\225\000\001\254\022\176\179\005\b?@\144@\002\005\245\225\000\001\254\023@\002\005\245\225\000\001\254\024@\005\bM@\160\177\176\001\004\2534symbolic_output_item@\b\000\000,\000@@\145\160\208\176\001\004_,Output_flush@\144@@\005\bX@\160\208\176\001\004`.Output_newline@\144@@\005\b]@\160\208\176\001\004a-Output_string@\144\160\176\179\144\005\007|@\144@\002\005\245\225\000\001\254\021@@\005\bg@\160\208\176\001\004b-Output_spaces@\144\160\176\179\144\005\b\\@\144@\002\005\245\225\000\001\254\020@@\005\bq@\160\208\176\001\004c-Output_indent@\144\160\176\179\144\005\bf@\144@\002\005\245\225\000\001\254\019@@\005\b{@@A@@@\005\b{@@\005\bxA\160\177\176\001\004\2546symbolic_output_buffer@\b\000\000,\000@@@A@@@\005\b\128@@\005\b}A\160\160\176\001\004\255;make_symbolic_output_buffer@\192\176\193@\176\179\144\005\bp@\144@\002\005\245\225\000\001\254\016\176\179\144\004\017@\144@\002\005\245\225\000\001\254\017@\002\005\245\225\000\001\254\018@\005\b\143@\160\160\176\001\005\000\160\176\193@\176\179\144\005\012\031@\144@\002\005\245\225\000\001\2539\176\179\144\005\012\029@\144@\002\005\245\225\000\001\253:@\002\005\245\225\000\001\253;@\002\005\245\225\000\001\253I@\002\005\245\225\000\001\253J@\002\005\245\225\000\001\253K@\005\0128\160\160\1600ocaml.deprecated\005\012<\144\160\160\160\176\145\162\t2Use Format.pp_get_formatter_out_functions instead.@\005\012D@@\005\012D@@@\160\160&Format\1440\206\172wan\183\020\0175:\154\1597\144\241w\160\160%Uchar\1440\172\0161\143?\002\000\000\135@\192\005\001\250\001\004=\002\000\000\135>\002\000\000\135b@\160BA\176get_formatter_output_functions\144\160\160A@@@\176>pp_get_formatter_out_functions\144\160\160B@@@\176>pp_get_formatter_tag_functions\144\160\160B@@@\176>pp_set_formatter_out_functions\144\160\160B@@@\176>pp_set_formatter_tag_functions\144\160\160B@@@\176>set_formatter_output_functions\144\160\160B@@@\176\t!pp_get_formatter_output_functions\144\160\160B@@@\176\t!pp_set_formatter_output_functions\144\160\160C@@@\176\t\"get_all_formatter_output_functions\144\160\160A@@@\176\t\"set_all_formatter_output_functions\144\160\160D@@@\176\t#formatter_of_symbolic_output_buffer\144\160\160A@@@\176\t%pp_get_all_formatter_output_functions\144\160\160B@@@\176\t%pp_set_all_formatter_output_functions\144\160\160E@@@@", (* Genlex *)"\132\149\166\190\000\000\000\024\000\000\000\b\000\000\000\024\000\000\000\023\160\144\176*make_lexer\144\160\160A\160A@@@A", -(* Js_exn *)"\132\149\166\190\000\000\003\144\000\000\000\214\000\000\002\244\000\000\002\213\160\240\176*raiseError\144\160\160A@A\144\148\192A\160\176\001\003\249#str@@\151\176C\160\151\176\181%Error\160\160AA@\182%Error@@\160\144\004\015@\176\1920others/js_exn.mlq\001\007z\001\007\142\192\004\002q\001\007z\001\007\155@@\176\192\004\004q\001\007z\001\007|\192\004\005q\001\007z\001\007\171@\160BA\176-raiseUriError\144\160\160A@A\144\148\192A\160\176\001\004\017#str@@\151\176C\160\151\176\181(URIError\160\004 @\182(URIError@@\160\144\004\014@\176\192\004\031\000V\001\011}\001\011\144\192\004 \000V\001\011}\001\011\162@@\176\192\004\"\000V\001\011}\001\011\127\192\004#\000V\001\011}\001\011\163@\160BA\176.raiseEvalError\144\160\160A@A\144\148\192A\160\176\001\003\253#str@@\151\176C\160\151\176\181)EvalError\160\004>@\182)EvalError@@\160\144\004\014@\176\192\004=w\001\b\031\001\b3\192\004>w\001\b\031\001\bD@@\176\192\004@w\001\b\031\001\b!\192\004Aw\001\b\031\001\bY@\160BA\176.raiseTypeError\144\160\160A@A\144\148\192A\160\176\001\004\r#str@@\151\176C\160\151\176\181)TypeError\160\004\\@\182)TypeError@@\160\144\004\014@\176\192\004[\000P\001\n\231\001\n\250\192\004\\\000P\001\n\231\001\011\r@@\176\192\004^\000P\001\n\231\001\n\233\192\004_\000P\001\n\231\001\011\014@\160BA\176/raiseRangeError\144\160\160A@A\144\148\192A\160\176\001\004\001#str@@\151\176C\160\151\176\181*RangeError\160\004z@\182*RangeError@@\160\144\004\014@\176\192\004y}\001\b\211\001\b\231\192\004z}\001\b\211\001\b\249@@\176\192\004|}\001\b\211\001\b\213\192\004}}\001\b\211\001\t\015@\160BA\1760raiseSyntaxError\144\160\160A@A\144\148\192A\160\176\001\004\t#str@@\151\176C\160\151\176\181+SyntaxError\160\004\152@\182+SyntaxError@@\160\144\004\014@\176\192\004\151\000J\001\nJ\001\n]\192\004\152\000J\001\nJ\001\nr@@\176\192\004\154\000J\001\nJ\001\nL\192\004\155\000J\001\nJ\001\ns@\160BA\1763raiseReferenceError\144\160\160A@A\144\148\192A\160\176\001\004\005#str@@\151\176C\160\151\176\181.ReferenceError\160\004\182@\182.ReferenceError@@\160\144\004\014@\176\192\004\181\000D\001\t\159\001\t\178\192\004\182\000D\001\t\159\001\t\202@@\176\192\004\184\000D\001\t\159\001\t\161\192\004\185\000D\001\t\159\001\t\203@\160BAA", +(* Js_exn *)"\132\149\166\190\000\000\004'\000\000\000\246\000\000\003g\000\000\003@\160\b\000\000 \000\176*raiseError\144\160\160A@A\144\148\192A\160\176\001\0048#str@@\151\176C\160\151\176\181%Error\160\160AA@\182%Error@@\160\144\004\015@\176\1920others/js_exn.mlu\001\007\213\001\007\233\192\004\002u\001\007\213\001\007\246@@\176\192\004\004u\001\007\213\001\007\215\192\004\005u\001\007\213\001\b\006@\160BA\176-raiseUriError\144\160\160A@A\144\148\192A\160\176\001\004P#str@@\151\176C\160\151\176\181(URIError\160\004 @\182(URIError@@\160\144\004\014@\176\192\004\031\000Z\001\011\216\001\011\235\192\004 \000Z\001\011\216\001\011\253@@\176\192\004\"\000Z\001\011\216\001\011\218\192\004#\000Z\001\011\216\001\011\254@\160BA\176.raiseEvalError\144\160\160A@A\144\148\192A\160\176\001\004<#str@@\151\176C\160\151\176\181)EvalError\160\004>@\182)EvalError@@\160\144\004\014@\176\192\004={\001\bz\001\b\142\192\004>{\001\bz\001\b\159@@\176\192\004@{\001\bz\001\b|\192\004A{\001\bz\001\b\180@\160BA\176.raiseTypeError\144\160\160A@A\144\148\192A\160\176\001\004L#str@@\151\176C\160\151\176\181)TypeError\160\004\\@\182)TypeError@@\160\144\004\014@\176\192\004[\000T\001\011B\001\011U\192\004\\\000T\001\011B\001\011h@@\176\192\004^\000T\001\011B\001\011D\192\004_\000T\001\011B\001\011i@\160BA\176/raiseRangeError\144\160\160A@A\144\148\192A\160\176\001\004@#str@@\151\176C\160\151\176\181*RangeError\160\004z@\182*RangeError@@\160\144\004\014@\176\192\004y\000A\001\t.\001\tB\192\004z\000A\001\t.\001\tT@@\176\192\004|\000A\001\t.\001\t0\192\004}\000A\001\t.\001\tj@\160BA\1760anyToExnInternal\144\160\160A@@\144\148\192A\160\176\001\003\249!x@@\147\176\151\176\161A\1468internalToOCamlException\160\145\176@2Caml_js_exceptionsA@\176\192&_none_A@\000\255\004\002A\160\144\004\018@\176\176\192\004\156q\001\007~\001\007\130\192\004\157q\001\007~\001\007\186@BA\160BA\1760raiseSyntaxError\144\160\160A@A\144\148\192A\160\176\001\004H#str@@\151\176C\160\151\176\181+SyntaxError\160\004\184@\182+SyntaxError@@\160\144\004\014@\176\192\004\183\000N\001\n\165\001\n\184\192\004\184\000N\001\n\165\001\n\205@@\176\192\004\186\000N\001\n\165\001\n\167\192\004\187\000N\001\n\165\001\n\206@\160BA\1763raiseReferenceError\144\160\160A@A\144\148\192A\160\176\001\004D#str@@\151\176C\160\151\176\181.ReferenceError\160\004\214@\182.ReferenceError@@\160\144\004\014@\176\192\004\213\000H\001\t\250\001\n\r\192\004\214\000H\001\t\250\001\n%@@\176\192\004\216\000H\001\t\250\001\t\252\192\004\217\000H\001\t\250\001\n&@\160BAA", (* Js_int *)"\132\149\166\190\000\000\000^\000\000\000\028\000\000\000X\000\000\000U\160\144\176%equal\144\160\160B@@\144\148\192B\160\176\001\003\242!x@\160\176\001\003\243!y@@\151\176\153@\160\144\004\n\160\144\004\t@\176\1920others/js_int.ml\001\000\161\001\023\132\001\023\155\192\004\002\001\000\161\001\023\132\001\023\160@\160BAA", (* Js_obj *)"\132\149\166\190\000\000\000\003\000\000\000\001\000\000\000\003\000\000\000\003\160\128A", (* Lexing *)"\132\149\166\190\000\000\003\030\000\000\000\197\000\000\002\161\000\000\002|\160\b\000\000D\000\176&engine\144\160\160C@@@\176&lexeme\144\160\160A@@@\176(new_line\144\160\160A@@@\176*lexeme_end\144\160\160A@@\144\148\192A\160\176\001\005\012&lexbuf@@\151\176\161C\161(pos_cnum@\160\151\176\161K\161*lex_curr_pA\160\144\004\015@\176\1924stdlib-406/lexing.ml\001\000\216\001\027w\001\027\143\192\004\002\001\000\216\001\027w\001\027\160@@\176\004\004\192\004\004\001\000\216\001\027w\001\027\169@\160BA\176*new_engine\144\160\160C@@@\176*sub_lexeme\144\160\160C@@@\176+flush_input\144\160\160A@@@\176+from_string\144\160\160A@@@\176+lexeme_char\144\160\160B@@@\176,from_channel\144\160\160A@@@\176,lexeme_end_p\144\160\160A@@\144\148\192A\160\176\001\005\016&lexbuf@@\151\176\161K\161\0047A\160\144\004\b@\176\192\0046\001\000\219\001\027\218\001\027\244\192\0047\001\000\219\001\027\218\001\028\005@\160BA\176,lexeme_start\144\160\160A@@\144\148\192A\160\176\001\005\n&lexbuf@@\151\176\161C\161\004R@\160\151\176\161J\161+lex_start_pA\160\144\004\014@\176\192\004Q\001\000\215\001\027A\001\027[\192\004R\001\000\215\001\027A\001\027m@@\176\004\003\192\004T\001\000\215\001\027A\001\027v@\160BA\176-from_function\144\160\160A@@@\176.lexeme_start_p\144\160\160A@@\144\148\192A\160\176\001\005\014&lexbuf@@\151\176\161J\161\004\029A\160\144\004\b@\176\192\004m\001\000\218\001\027\171\001\027\199\192\004n\001\000\218\001\027\171\001\027\217@\160BA\176.sub_lexeme_opt\144\160\160C@@@\176/sub_lexeme_char\144\160\160B@@\144\148\192B\160\176\001\005\001&lexbuf@\160\176\001\005\002!i@@\151\176c\160\151\176\161A\161*lex_bufferA\160\144\004\015@\176\192\004\142\001\000\203\001\026?\001\026h\192\004\143\001\000\203\001\026?\001\026y@\160\144\004\017@\176\192\004\147\001\000\203\001\026?\001\026^\192\004\148\001\000\203\001\026?\001\026{@\160BA\1763sub_lexeme_char_opt\144\160\160B@@@A", @@ -376368,243 +376368,129 @@ let property_key (s : J.property_name) : string = | Symbol_name -> {|[Symbol.for("name")]|} end -module Js_fold +module Js_iter = struct -#1 "js_fold.ml" +#1 "js_iter.ml" open J - class virtual fold = - object ((o : 'self_type)) - method unknown : 'a. 'a -> 'self_type = fun _ -> o - method string : string -> 'self_type = fun _ -> o + let unknown _self _ = () + class iter = + object ((_self : 'self_type)) method option : - 'a. ('self_type -> 'a -> 'self_type) -> 'a option -> 'self_type = - fun _f_a -> function | None -> o | Some _x -> let o = _f_a o _x in o + 'a. ('self_type -> 'a -> unit) -> 'a option -> unit = + fun _f_a -> function | None -> () | Some _x -> _f_a _self _x method list : - 'a. ('self_type -> 'a -> 'self_type) -> 'a list -> 'self_type = + 'a. ('self_type -> 'a -> unit) -> 'a list -> unit = fun _f_a -> function - | [] -> o - | _x :: _x_i1 -> let o = _f_a o _x in let o = o#list _f_a _x_i1 in o - method int32 : int32 -> 'self_type = fun _ -> o - method int : int -> 'self_type = fun _ -> o - method bool : bool -> 'self_type = fun _ -> o - method label : label -> 'self_type = o#string -method binop : binop -> 'self_type = o#unknown -method int_op : int_op -> 'self_type = o#unknown -method kind : kind -> 'self_type = o#unknown -method property : property -> 'self_type = o#unknown -method number : number -> 'self_type = o#unknown -method mutable_flag : mutable_flag -> 'self_type = o#unknown -method ident_info : ident_info -> 'self_type = o#unknown -method exports : exports -> 'self_type = o#unknown -method tag_info : tag_info -> 'self_type = o#unknown -method required_modules : required_modules -> 'self_type = o#list (fun o -> o#module_id) -method property_name : property_name -> 'self_type = o#unknown -method ident : ident -> 'self_type = o#unknown -method module_id : module_id -> 'self_type = fun { id = _x0;kind = _x1} -> let o = o#ident _x0 in -let o = o#unknown _x1 in o -method vident : vident -> 'self_type = function + | [] -> () + | _x :: _x_i1 -> _f_a _self _x ; _self#list _f_a _x_i1 + method label : label -> unit = unknown _self +method required_modules : required_modules -> unit = _self#list (fun _self -> _self#module_id) +method ident : ident -> unit = unknown _self +method module_id : module_id -> unit = fun { id = _x0;kind = _x1} -> begin _self#ident _x0 end +method vident : vident -> unit = function | Id ( _x0) -> -let o = o#ident _x0 in - o + begin _self#ident _x0 end |Qualified ( _x0,_x1) -> -let o = o#module_id _x0 in -let o = o#option (fun o -> o#string) _x1 in - o -method exception_ident : exception_ident -> 'self_type = o#ident -method for_ident : for_ident -> 'self_type = o#ident -method for_direction : for_direction -> 'self_type = o#unknown -method property_map : property_map -> 'self_type = o#list (fun o -> fun ( _x0,_x1) -> let o = o#property_name _x0 in let o = o#expression _x1 in o) -method length_object : length_object -> 'self_type = o#unknown -method expression_desc : expression_desc -> 'self_type = function + begin _self#module_id _x0;_self#option (fun _self -> unknown _self) _x1 end +method exception_ident : exception_ident -> unit = _self#ident +method for_ident : for_ident -> unit = _self#ident +method for_direction : for_direction -> unit = unknown _self +method property_map : property_map -> unit = _self#list (fun _self -> fun ( _x0,_x1) -> begin _self#expression _x1 end) +method length_object : length_object -> unit = unknown _self +method expression_desc : expression_desc -> unit = function | Length ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#length_object _x1 in - o + begin _self#expression _x0;_self#length_object _x1 end |Char_of_int ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Char_to_int ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Is_null_or_undefined ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |String_append ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o -|Bool ( _x0) -> -let o = o#bool _x0 in - o + begin _self#expression _x0;_self#expression _x1 end +|Bool _ -> () |Typeof ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Js_not ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Seq ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Cond ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#expression _x1 in -let o = o#expression _x2 in - o + begin _self#expression _x0;_self#expression _x1;_self#expression _x2 end |Bin ( _x0,_x1,_x2) -> -let o = o#binop _x0 in -let o = o#expression _x1 in -let o = o#expression _x2 in - o + begin _self#expression _x1;_self#expression _x2 end |FlatCall ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Call ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#expression) _x1 in -let o = o#unknown _x2 in - o + begin _self#expression _x0;_self#list (fun _self -> _self#expression) _x1 end |String_index ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Array_index ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#expression _x1 in - o + begin _self#expression _x0;_self#expression _x1 end |Static_index ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#string _x1 in -let o = o#option (fun o -> o#int32) _x2 in - o + begin _self#expression _x0;_self#option (fun _self -> unknown _self) _x2 end |New ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#option (fun o -> o#list (fun o -> o#expression)) _x1 in - o + begin _self#expression _x0;_self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 end |Var ( _x0) -> -let o = o#vident _x0 in - o + begin _self#vident _x0 end |Fun ( _x0,_x1,_x2,_x3) -> -let o = o#bool _x0 in -let o = o#list (fun o -> o#ident) _x1 in -let o = o#block _x2 in -let o = o#unknown _x3 in - o -|Str ( _x0,_x1) -> -let o = o#bool _x0 in -let o = o#string _x1 in - o -|Unicode ( _x0) -> -let o = o#string _x0 in - o -|Raw_js_code ( _x0) -> -let o = o#unknown _x0 in - o + begin _self#list (fun _self -> _self#ident) _x1;_self#block _x2 end +|Str _ -> () +|Unicode _ -> () +|Raw_js_code _ -> () |Array ( _x0,_x1) -> -let o = o#list (fun o -> o#expression) _x0 in -let o = o#mutable_flag _x1 in - o + begin _self#list (fun _self -> _self#expression) _x0 end |Optional_block ( _x0,_x1) -> -let o = o#expression _x0 in -let o = o#bool _x1 in - o + begin _self#expression _x0 end |Caml_block ( _x0,_x1,_x2,_x3) -> -let o = o#list (fun o -> o#expression) _x0 in -let o = o#mutable_flag _x1 in -let o = o#expression _x2 in -let o = o#tag_info _x3 in - o + begin _self#list (fun _self -> _self#expression) _x0;_self#expression _x2 end |Caml_block_tag ( _x0) -> -let o = o#expression _x0 in - o -|Number ( _x0) -> -let o = o#number _x0 in - o + begin _self#expression _x0 end +|Number _ -> () |Object ( _x0) -> -let o = o#property_map _x0 in - o -|Undefined -> o -|Null -> o -method for_ident_expression : for_ident_expression -> 'self_type = o#expression -method finish_ident_expression : finish_ident_expression -> 'self_type = o#expression -method statement_desc : statement_desc -> 'self_type = function + begin _self#property_map _x0 end +|Undefined -> () +|Null -> () +method for_ident_expression : for_ident_expression -> unit = _self#expression +method finish_ident_expression : finish_ident_expression -> unit = _self#expression +method statement_desc : statement_desc -> unit = function | Block ( _x0) -> -let o = o#block _x0 in - o + begin _self#block _x0 end |Variable ( _x0) -> -let o = o#variable_declaration _x0 in - o + begin _self#variable_declaration _x0 end |Exp ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |If ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#block _x1 in -let o = o#block _x2 in - o + begin _self#expression _x0;_self#block _x1;_self#block _x2 end |While ( _x0,_x1,_x2,_x3) -> -let o = o#option (fun o -> o#label) _x0 in -let o = o#expression _x1 in -let o = o#block _x2 in -let o = o#unknown _x3 in - o + begin _self#option (fun _self -> _self#label) _x0;_self#expression _x1;_self#block _x2 end |ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> -let o = o#option (fun o -> o#for_ident_expression) _x0 in -let o = o#finish_ident_expression _x1 in -let o = o#for_ident _x2 in -let o = o#for_direction _x3 in -let o = o#block _x4 in -let o = o#unknown _x5 in - o + begin _self#option (fun _self -> _self#for_ident_expression) _x0;_self#finish_ident_expression _x1;_self#for_ident _x2;_self#for_direction _x3;_self#block _x4 end |Continue ( _x0) -> -let o = o#label _x0 in - o -|Break -> o + begin _self#label _x0 end +|Break -> () |Return ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Int_switch ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#int_clause) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o + begin _self#expression _x0;_self#list (fun _self -> _self#int_clause) _x1;_self#option (fun _self -> _self#block) _x2 end |String_switch ( _x0,_x1,_x2) -> -let o = o#expression _x0 in -let o = o#list (fun o -> o#string_clause) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o + begin _self#expression _x0;_self#list (fun _self -> _self#string_clause) _x1;_self#option (fun _self -> _self#block) _x2 end |Throw ( _x0) -> -let o = o#expression _x0 in - o + begin _self#expression _x0 end |Try ( _x0,_x1,_x2) -> -let o = o#block _x0 in -let o = o#option (fun o -> fun ( _x0,_x1) -> let o = o#exception_ident _x0 in let o = o#block _x1 in o) _x1 in -let o = o#option (fun o -> o#block) _x2 in - o -|Debugger -> o -method expression : expression -> 'self_type = fun { expression_desc = _x0;comment = _x1} -> let o = o#expression_desc _x0 in -let o = o#option (fun o -> o#string) _x1 in o -method statement : statement -> 'self_type = fun { statement_desc = _x0;comment = _x1} -> let o = o#statement_desc _x0 in -let o = o#option (fun o -> o#string) _x1 in o -method variable_declaration : variable_declaration -> 'self_type = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let o = o#ident _x0 in -let o = o#option (fun o -> o#expression) _x1 in -let o = o#property _x2 in -let o = o#ident_info _x3 in o -method string_clause : string_clause -> 'self_type = fun ( _x0,_x1) -> let o = o#string _x0 in let o = o#case_clause _x1 in o -method int_clause : int_clause -> 'self_type = fun ( _x0,_x1) -> let o = o#int _x0 in let o = o#case_clause _x1 in o -method case_clause : case_clause -> 'self_type = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let o = o#block _x0 in -let o = o#bool _x1 in -let o = o#option (fun o -> o#string) _x2 in o -method block : block -> 'self_type = o#list (fun o -> o#statement) -method program : program -> 'self_type = fun { block = _x0;exports = _x1;export_set = _x2} -> let o = o#block _x0 in -let o = o#exports _x1 in -let o = o#unknown _x2 in o -method deps_program : deps_program -> 'self_type = fun { program = _x0;modules = _x1;side_effect = _x2} -> let o = o#program _x0 in -let o = o#required_modules _x1 in -let o = o#option (fun o -> o#string) _x2 in o + begin _self#block _x0;_self#option (fun _self -> fun ( _x0,_x1) -> begin _self#exception_ident _x0;_self#block _x1 end) _x1;_self#option (fun _self -> _self#block) _x2 end +|Debugger -> () +method expression : expression -> unit = fun { expression_desc = _x0;comment = _x1} -> begin _self#expression_desc _x0;_self#option (fun _self -> unknown _self) _x1 end +method statement : statement -> unit = fun { statement_desc = _x0;comment = _x1} -> begin _self#statement_desc _x0;_self#option (fun _self -> unknown _self) _x1 end +method variable_declaration : variable_declaration -> unit = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> begin _self#ident _x0;_self#option (fun _self -> _self#expression) _x1 end +method string_clause : string_clause -> unit = fun ( _x0,_x1) -> begin _self#case_clause _x1 end +method int_clause : int_clause -> unit = fun ( _x0,_x1) -> begin _self#case_clause _x1 end +method case_clause : case_clause -> unit = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> begin _self#block _x0;_self#option (fun _self -> unknown _self) _x2 end +method block : block -> unit = _self#list (fun _self -> _self#statement) +method program : program -> unit = fun { block = _x0;exports = _x1;export_set = _x2} -> begin _self#block _x0 end +method deps_program : deps_program -> unit = fun { program = _x0;modules = _x1;side_effect = _x2} -> begin _self#program _x0;_self#required_modules _x1;_self#option (fun _self -> unknown _self) _x2 end end end @@ -376950,23 +376836,22 @@ let add_defined_idents (x : idents_stats) ident = Note such shaking is done in the toplevel, so that it requires us to flatten the statement first *) -let free_variables (stats : idents_stats) : Js_fold.fold = +let free_variables (stats : idents_stats) : Js_iter.iter = object (self) - inherit Js_fold.fold as super + inherit Js_iter.iter as super method! variable_declaration st = add_defined_idents stats st.ident; match st.value with | None - -> self + -> () | Some v -> self # expression v method! ident id = (if not (Set_ident.mem stats.defined_idents id )then - stats.used_idents <- Set_ident.add stats.used_idents id); - self - method! expression exp = + stats.used_idents <- Set_ident.add stats.used_idents id) + method! expression exp = match exp.expression_desc with | Fun(_, _,_, env) (** a optimization to avoid walking into funciton again @@ -376974,8 +376859,8 @@ let free_variables (stats : idents_stats) : Js_fold.fold = *) -> stats.used_idents <- - Set_ident.union (Js_fun_env.get_unbounded env) stats.used_idents; - self + Set_ident.union (Js_fun_env.get_unbounded env) stats.used_idents + | _ -> @@ -377046,32 +376931,31 @@ and no_side_effect (x : J.expression) = let no_side_effect_expression (x : J.expression) = no_side_effect x -let no_side_effect clean : Js_fold.fold = +let no_side_effect clean : Js_iter.iter = object (self) - inherit Js_fold.fold as super + inherit Js_iter.iter as super method! statement s = - if not !clean then self else + if !clean then match s.statement_desc with | Throw _ | Debugger | Break | Variable _ | Continue _ -> - clean := false ; self + clean := false | Exp e -> self#expression e | Int_switch _ | String_switch _ | ForRange _ | If _ | While _ | Block _ | Return _ | Try _ -> super#statement s method! list f x = - if not !clean then self else super#list f x + if !clean then super#list f x method! expression s = - (if !clean then - clean := no_side_effect_expression s); - self - (** only expression would cause side effec *) + if !clean then + clean := no_side_effect_expression s + (** only expression would cause side effec *) end let no_side_effect_statement st = let clean = ref true in - let _ : Js_fold.fold = ((no_side_effect clean)#statement st) in + (no_side_effect clean)#statement st; !clean (* TODO: generate [fold2] @@ -381738,11 +381622,11 @@ end = struct let add_lam_module_ident = Lam_module_ident.Hash_set.add let create = Lam_module_ident.Hash_set.create let count_hard_dependencies hard_dependencies = - object(self : 'self_type) - inherit Js_fold.fold as super + object + inherit Js_iter.iter as super method! module_id vid = - add_lam_module_ident hard_dependencies vid; self - method! expression x : 'self_type = + add_lam_module_ident hard_dependencies vid + method! expression x = (* check {!Js_pass_scope} when making changes *) (match Js_block_runtime.check_additional_id x with | Some id -> @@ -381755,7 +381639,7 @@ let count_hard_dependencies hard_dependencies = let calculate_hard_dependencies block = let hard_dependencies = create 17 in - let _ : Js_fold.fold = (count_hard_dependencies hard_dependencies)#block block in + (count_hard_dependencies hard_dependencies)#block block ; hard_dependencies (* @@ -383961,241 +383845,199 @@ module Js_map #1 "js_map.ml" open J -class virtual map = object -((o : 'self_type)) -method unknown : 'a. 'a -> 'a = fun x -> x -method string : string -> string = fun x -> x +let unknown : 'a. 'a -> 'a = fun x -> x +class map = object +((_self : 'self_type)) method option : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a option -> 'a_out option = fun _f_a -> - function | None -> None | Some _x -> let _x = _f_a o _x in Some _x + function | None -> None | Some _x -> let _x = _f_a _self _x in Some _x method list : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a list -> 'a_out list = fun _f_a -> function | [] -> [] | _x :: _x_i1 -> - let _x = _f_a o _x in - let _x_i1 = o#list _f_a _x_i1 in _x :: _x_i1 -method int32 : int32 -> int32 = fun x -> x -method int : int -> int = fun x -> x -method bool : bool -> bool = fun x -> x -method label : label -> label = o#string -method binop : binop -> binop = o#unknown -method int_op : int_op -> int_op = o#unknown -method kind : kind -> kind = o#unknown -method property : property -> property = o#unknown -method number : number -> number = o#unknown -method mutable_flag : mutable_flag -> mutable_flag = o#unknown -method ident_info : ident_info -> ident_info = o#unknown -method exports : exports -> exports = o#unknown -method tag_info : tag_info -> tag_info = o#unknown -method required_modules : required_modules -> required_modules = o#list (fun o -> o#module_id) -method property_name : property_name -> property_name = o#unknown -method ident : ident -> ident = o#unknown -method module_id : module_id -> module_id = fun { id = _x0;kind = _x1} -> let _x0 = o#ident _x0 in -let _x1 = o#unknown _x1 in {id = _x0;kind = _x1} + let _x = _f_a _self _x in + let _x_i1 = _self#list _f_a _x_i1 in _x :: _x_i1 +method label : label -> label = unknown +method required_modules : required_modules -> required_modules = _self#list (fun _self -> _self#module_id) +method ident : ident -> ident = unknown +method module_id : module_id -> module_id = fun { id = _x0;kind = _x1} -> let _x0 = _self#ident _x0 in {id = _x0;kind = _x1} method vident : vident -> vident = function | Id ( _x0) -> -let _x0 = o#ident _x0 in +let _x0 = _self#ident _x0 in Id ( _x0) |Qualified ( _x0,_x1) -> -let _x0 = o#module_id _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in +let _x0 = _self#module_id _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in Qualified ( _x0,_x1) -method exception_ident : exception_ident -> exception_ident = o#ident -method for_ident : for_ident -> for_ident = o#ident -method for_direction : for_direction -> for_direction = o#unknown -method property_map : property_map -> property_map = o#list (fun o -> fun ( _x0,_x1) -> let _x0 = o#property_name _x0 in let _x1 = o#expression _x1 in _x0,_x1) -method length_object : length_object -> length_object = o#unknown +method exception_ident : exception_ident -> exception_ident = _self#ident +method for_ident : for_ident -> for_ident = _self#ident +method for_direction : for_direction -> for_direction = unknown +method property_map : property_map -> property_map = _self#list (fun _self -> fun ( _x0,_x1) -> let _x1 = _self#expression _x1 in _x0,_x1) +method length_object : length_object -> length_object = unknown method expression_desc : expression_desc -> expression_desc = function | Length ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#length_object _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#length_object _x1 in Length ( _x0,_x1) |Char_of_int ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Char_of_int ( _x0) |Char_to_int ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Char_to_int ( _x0) |Is_null_or_undefined ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Is_null_or_undefined ( _x0) |String_append ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in String_append ( _x0,_x1) -|Bool ( _x0) -> -let _x0 = o#bool _x0 in -Bool ( _x0) +|Bool _ as v -> v |Typeof ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Typeof ( _x0) |Js_not ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Js_not ( _x0) |Seq ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in Seq ( _x0,_x1) |Cond ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#expression _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in +let _x2 = _self#expression _x2 in Cond ( _x0,_x1,_x2) |Bin ( _x0,_x1,_x2) -> -let _x0 = o#binop _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#expression _x2 in +let _x1 = _self#expression _x1 in +let _x2 = _self#expression _x2 in Bin ( _x0,_x1,_x2) |FlatCall ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in FlatCall ( _x0,_x1) |Call ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#expression) _x1 in -let _x2 = o#unknown _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#expression) _x1 in Call ( _x0,_x1,_x2) |String_index ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in String_index ( _x0,_x1) |Array_index ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#expression _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#expression _x1 in Array_index ( _x0,_x1) |Static_index ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#string _x1 in -let _x2 = o#option (fun o -> o#int32) _x2 in +let _x0 = _self#expression _x0 in +let _x2 = _self#option (fun _self -> unknown) _x2 in Static_index ( _x0,_x1,_x2) |New ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#option (fun o -> o#list (fun o -> o#expression)) _x1 in +let _x0 = _self#expression _x0 in +let _x1 = _self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 in New ( _x0,_x1) |Var ( _x0) -> -let _x0 = o#vident _x0 in +let _x0 = _self#vident _x0 in Var ( _x0) |Fun ( _x0,_x1,_x2,_x3) -> -let _x0 = o#bool _x0 in -let _x1 = o#list (fun o -> o#ident) _x1 in -let _x2 = o#block _x2 in -let _x3 = o#unknown _x3 in +let _x1 = _self#list (fun _self -> _self#ident) _x1 in +let _x2 = _self#block _x2 in Fun ( _x0,_x1,_x2,_x3) -|Str ( _x0,_x1) -> -let _x0 = o#bool _x0 in -let _x1 = o#string _x1 in -Str ( _x0,_x1) -|Unicode ( _x0) -> -let _x0 = o#string _x0 in -Unicode ( _x0) -|Raw_js_code ( _x0) -> -let _x0 = o#unknown _x0 in -Raw_js_code ( _x0) +|Str _ as v -> v +|Unicode _ as v -> v +|Raw_js_code _ as v -> v |Array ( _x0,_x1) -> -let _x0 = o#list (fun o -> o#expression) _x0 in -let _x1 = o#mutable_flag _x1 in +let _x0 = _self#list (fun _self -> _self#expression) _x0 in Array ( _x0,_x1) |Optional_block ( _x0,_x1) -> -let _x0 = o#expression _x0 in -let _x1 = o#bool _x1 in +let _x0 = _self#expression _x0 in Optional_block ( _x0,_x1) |Caml_block ( _x0,_x1,_x2,_x3) -> -let _x0 = o#list (fun o -> o#expression) _x0 in -let _x1 = o#mutable_flag _x1 in -let _x2 = o#expression _x2 in -let _x3 = o#tag_info _x3 in +let _x0 = _self#list (fun _self -> _self#expression) _x0 in +let _x2 = _self#expression _x2 in Caml_block ( _x0,_x1,_x2,_x3) |Caml_block_tag ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Caml_block_tag ( _x0) -|Number ( _x0) -> -let _x0 = o#number _x0 in -Number ( _x0) +|Number _ as v -> v |Object ( _x0) -> -let _x0 = o#property_map _x0 in +let _x0 = _self#property_map _x0 in Object ( _x0) -|Undefined -> Undefined -|Null -> Null -method for_ident_expression : for_ident_expression -> for_ident_expression = o#expression -method finish_ident_expression : finish_ident_expression -> finish_ident_expression = o#expression +|Undefined as v -> v +|Null as v -> v +method for_ident_expression : for_ident_expression -> for_ident_expression = _self#expression +method finish_ident_expression : finish_ident_expression -> finish_ident_expression = _self#expression method statement_desc : statement_desc -> statement_desc = function | Block ( _x0) -> -let _x0 = o#block _x0 in +let _x0 = _self#block _x0 in Block ( _x0) |Variable ( _x0) -> -let _x0 = o#variable_declaration _x0 in +let _x0 = _self#variable_declaration _x0 in Variable ( _x0) |Exp ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Exp ( _x0) |If ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#block _x1 in -let _x2 = o#block _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#block _x1 in +let _x2 = _self#block _x2 in If ( _x0,_x1,_x2) |While ( _x0,_x1,_x2,_x3) -> -let _x0 = o#option (fun o -> o#label) _x0 in -let _x1 = o#expression _x1 in -let _x2 = o#block _x2 in -let _x3 = o#unknown _x3 in +let _x0 = _self#option (fun _self -> _self#label) _x0 in +let _x1 = _self#expression _x1 in +let _x2 = _self#block _x2 in While ( _x0,_x1,_x2,_x3) |ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> -let _x0 = o#option (fun o -> o#for_ident_expression) _x0 in -let _x1 = o#finish_ident_expression _x1 in -let _x2 = o#for_ident _x2 in -let _x3 = o#for_direction _x3 in -let _x4 = o#block _x4 in -let _x5 = o#unknown _x5 in +let _x0 = _self#option (fun _self -> _self#for_ident_expression) _x0 in +let _x1 = _self#finish_ident_expression _x1 in +let _x2 = _self#for_ident _x2 in +let _x3 = _self#for_direction _x3 in +let _x4 = _self#block _x4 in ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) |Continue ( _x0) -> -let _x0 = o#label _x0 in +let _x0 = _self#label _x0 in Continue ( _x0) -|Break -> Break +|Break as v -> v |Return ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Return ( _x0) |Int_switch ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#int_clause) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#int_clause) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in Int_switch ( _x0,_x1,_x2) |String_switch ( _x0,_x1,_x2) -> -let _x0 = o#expression _x0 in -let _x1 = o#list (fun o -> o#string_clause) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#expression _x0 in +let _x1 = _self#list (fun _self -> _self#string_clause) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in String_switch ( _x0,_x1,_x2) |Throw ( _x0) -> -let _x0 = o#expression _x0 in +let _x0 = _self#expression _x0 in Throw ( _x0) |Try ( _x0,_x1,_x2) -> -let _x0 = o#block _x0 in -let _x1 = o#option (fun o -> fun ( _x0,_x1) -> let _x0 = o#exception_ident _x0 in let _x1 = o#block _x1 in _x0,_x1) _x1 in -let _x2 = o#option (fun o -> o#block) _x2 in +let _x0 = _self#block _x0 in +let _x1 = _self#option (fun _self -> fun ( _x0,_x1) -> let _x0 = _self#exception_ident _x0 in let _x1 = _self#block _x1 in _x0,_x1) _x1 in +let _x2 = _self#option (fun _self -> _self#block) _x2 in Try ( _x0,_x1,_x2) -|Debugger -> Debugger -method expression : expression -> expression = fun { expression_desc = _x0;comment = _x1} -> let _x0 = o#expression_desc _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in {expression_desc = _x0;comment = _x1} -method statement : statement -> statement = fun { statement_desc = _x0;comment = _x1} -> let _x0 = o#statement_desc _x0 in -let _x1 = o#option (fun o -> o#string) _x1 in {statement_desc = _x0;comment = _x1} -method variable_declaration : variable_declaration -> variable_declaration = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _x0 = o#ident _x0 in -let _x1 = o#option (fun o -> o#expression) _x1 in -let _x2 = o#property _x2 in -let _x3 = o#ident_info _x3 in {ident = _x0;value = _x1;property = _x2;ident_info = _x3} -method string_clause : string_clause -> string_clause = fun ( _x0,_x1) -> let _x0 = o#string _x0 in let _x1 = o#case_clause _x1 in _x0,_x1 -method int_clause : int_clause -> int_clause = fun ( _x0,_x1) -> let _x0 = o#int _x0 in let _x1 = o#case_clause _x1 in _x0,_x1 -method case_clause : case_clause -> case_clause = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _x0 = o#block _x0 in -let _x1 = o#bool _x1 in -let _x2 = o#option (fun o -> o#string) _x2 in {switch_body = _x0;should_break = _x1;comment = _x2} -method block : block -> block = o#list (fun o -> o#statement) -method program : program -> program = fun { block = _x0;exports = _x1;export_set = _x2} -> let _x0 = o#block _x0 in -let _x1 = o#exports _x1 in -let _x2 = o#unknown _x2 in {block = _x0;exports = _x1;export_set = _x2} -method deps_program : deps_program -> deps_program = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _x0 = o#program _x0 in -let _x1 = o#required_modules _x1 in -let _x2 = o#option (fun o -> o#string) _x2 in {program = _x0;modules = _x1;side_effect = _x2} +|Debugger as v -> v +method expression : expression -> expression = fun { expression_desc = _x0;comment = _x1} -> let _x0 = _self#expression_desc _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in {expression_desc = _x0;comment = _x1} +method statement : statement -> statement = fun { statement_desc = _x0;comment = _x1} -> let _x0 = _self#statement_desc _x0 in +let _x1 = _self#option (fun _self -> unknown) _x1 in {statement_desc = _x0;comment = _x1} +method variable_declaration : variable_declaration -> variable_declaration = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _x0 = _self#ident _x0 in +let _x1 = _self#option (fun _self -> _self#expression) _x1 in {ident = _x0;value = _x1;property = _x2;ident_info = _x3} +method string_clause : string_clause -> string_clause = fun ( _x0,_x1) -> let _x1 = _self#case_clause _x1 in _x0,_x1 +method int_clause : int_clause -> int_clause = fun ( _x0,_x1) -> let _x1 = _self#case_clause _x1 in _x0,_x1 +method case_clause : case_clause -> case_clause = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _x0 = _self#block _x0 in +let _x2 = _self#option (fun _self -> unknown) _x2 in {switch_body = _x0;should_break = _x1;comment = _x2} +method block : block -> block = _self#list (fun _self -> _self#statement) +method program : program -> program = fun { block = _x0;exports = _x1;export_set = _x2} -> let _x0 = _self#block _x0 in {block = _x0;exports = _x1;export_set = _x2} +method deps_program : deps_program -> deps_program = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _x0 = _self#program _x0 in +let _x1 = _self#required_modules _x1 in +let _x2 = _self#option (fun _self -> unknown) _x2 in {program = _x0;modules = _x1;side_effect = _x2} end end @@ -384437,8 +384279,8 @@ type meta_info = let mark_dead_code (js : J.program) : J.program = let ident_use_stats : meta_info Hash_ident.t = Hash_ident.create 17 in - let mark_dead : Js_fold.fold = object (self) - inherit Js_fold.fold + let mark_dead : Js_iter.iter = object (self) + inherit Js_iter.iter method! ident ident = (match Hash_ident.find_opt ident_use_stats ident with | None -> (* First time *) @@ -384447,14 +384289,13 @@ let mark_dead_code (js : J.program) : J.program = | Some Recursive -> () | Some (Info x) -> Js_op_util.update_used_stats x Used ) - ; self method! variable_declaration vd = match vd.ident_info.used_stats with | Dead_pure - -> self + -> () | Dead_non_pure -> begin match vd.value with - | None -> self + | None -> () | Some x -> self#expression x end | _ -> @@ -384462,7 +384303,7 @@ let mark_dead_code (js : J.program) : J.program = let pure = match value with | None -> true - | Some x -> ignore (self#expression x); Js_analyzer.no_side_effect_expression x in + | Some x -> (self#expression x); Js_analyzer.no_side_effect_expression x in ( let () = if Set_ident.mem js.export_set ident then @@ -384481,9 +384322,9 @@ let mark_dead_code (js : J.program) : J.program = | None -> (* First time *) Hash_ident.add ident_use_stats ident (Info ident_info); Js_op_util.update_used_stats ident_info - (if pure then Scanning_pure else Scanning_non_pure)); self + (if pure then Scanning_pure else Scanning_non_pure)) end in - let _ = (mark_dead#program js) in + let () = (mark_dead#program js) in Hash_ident.iter ident_use_stats (fun _id (info : meta_info) -> match info with | Info ({used_stats = Scanning_pure} as info) -> @@ -384662,6 +384503,204 @@ let program (js : J.program) = since the benefit is not obvious *) +end +module Js_fold += struct +#1 "js_fold.ml" + + open J + let [@inline] unknown _self _ = _self + class fold = + object ((_self : 'self_type)) + method option : + 'a. ('self_type -> 'a -> 'self_type) -> 'a option -> 'self_type = + fun _f_a -> function | None -> _self | Some _x -> let _self = _f_a _self _x in _self + method list : + 'a. ('self_type -> 'a -> 'self_type) -> 'a list -> 'self_type = + fun _f_a -> + function + | [] -> _self + | _x :: _x_i1 -> let _self = _f_a _self _x in let _self = _self#list _f_a _x_i1 in _self + method label : label -> 'self_type = unknown _self +method required_modules : required_modules -> 'self_type = _self#list (fun _self -> _self#module_id) +method ident : ident -> 'self_type = unknown _self +method module_id : module_id -> 'self_type = fun { id = _x0;kind = _x1} -> let _self = _self#ident _x0 in _self +method vident : vident -> 'self_type = function +| Id ( _x0) -> +let _self = _self#ident _x0 in + _self +|Qualified ( _x0,_x1) -> +let _self = _self#module_id _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in + _self +method exception_ident : exception_ident -> 'self_type = _self#ident +method for_ident : for_ident -> 'self_type = _self#ident +method for_direction : for_direction -> 'self_type = unknown _self +method property_map : property_map -> 'self_type = _self#list (fun _self -> fun ( _x0,_x1) -> let _self = _self#expression _x1 in _self) +method length_object : length_object -> 'self_type = unknown _self +method expression_desc : expression_desc -> 'self_type = function +| Length ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#length_object _x1 in + _self +|Char_of_int ( _x0) -> +let _self = _self#expression _x0 in + _self +|Char_to_int ( _x0) -> +let _self = _self#expression _x0 in + _self +|Is_null_or_undefined ( _x0) -> +let _self = _self#expression _x0 in + _self +|String_append ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Bool _ -> _self +|Typeof ( _x0) -> +let _self = _self#expression _x0 in + _self +|Js_not ( _x0) -> +let _self = _self#expression _x0 in + _self +|Seq ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Cond ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in +let _self = _self#expression _x2 in + _self +|Bin ( _x0,_x1,_x2) -> +let _self = _self#expression _x1 in +let _self = _self#expression _x2 in + _self +|FlatCall ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Call ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#expression) _x1 in + _self +|String_index ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Array_index ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#expression _x1 in + _self +|Static_index ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#option (fun _self -> unknown _self) _x2 in + _self +|New ( _x0,_x1) -> +let _self = _self#expression _x0 in +let _self = _self#option (fun _self -> _self#list (fun _self -> _self#expression)) _x1 in + _self +|Var ( _x0) -> +let _self = _self#vident _x0 in + _self +|Fun ( _x0,_x1,_x2,_x3) -> +let _self = _self#list (fun _self -> _self#ident) _x1 in +let _self = _self#block _x2 in + _self +|Str _ -> _self +|Unicode _ -> _self +|Raw_js_code _ -> _self +|Array ( _x0,_x1) -> +let _self = _self#list (fun _self -> _self#expression) _x0 in + _self +|Optional_block ( _x0,_x1) -> +let _self = _self#expression _x0 in + _self +|Caml_block ( _x0,_x1,_x2,_x3) -> +let _self = _self#list (fun _self -> _self#expression) _x0 in +let _self = _self#expression _x2 in + _self +|Caml_block_tag ( _x0) -> +let _self = _self#expression _x0 in + _self +|Number _ -> _self +|Object ( _x0) -> +let _self = _self#property_map _x0 in + _self +|Undefined -> _self +|Null -> _self +method for_ident_expression : for_ident_expression -> 'self_type = _self#expression +method finish_ident_expression : finish_ident_expression -> 'self_type = _self#expression +method statement_desc : statement_desc -> 'self_type = function +| Block ( _x0) -> +let _self = _self#block _x0 in + _self +|Variable ( _x0) -> +let _self = _self#variable_declaration _x0 in + _self +|Exp ( _x0) -> +let _self = _self#expression _x0 in + _self +|If ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#block _x1 in +let _self = _self#block _x2 in + _self +|While ( _x0,_x1,_x2,_x3) -> +let _self = _self#option (fun _self -> _self#label) _x0 in +let _self = _self#expression _x1 in +let _self = _self#block _x2 in + _self +|ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) -> +let _self = _self#option (fun _self -> _self#for_ident_expression) _x0 in +let _self = _self#finish_ident_expression _x1 in +let _self = _self#for_ident _x2 in +let _self = _self#for_direction _x3 in +let _self = _self#block _x4 in + _self +|Continue ( _x0) -> +let _self = _self#label _x0 in + _self +|Break -> _self +|Return ( _x0) -> +let _self = _self#expression _x0 in + _self +|Int_switch ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#int_clause) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|String_switch ( _x0,_x1,_x2) -> +let _self = _self#expression _x0 in +let _self = _self#list (fun _self -> _self#string_clause) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|Throw ( _x0) -> +let _self = _self#expression _x0 in + _self +|Try ( _x0,_x1,_x2) -> +let _self = _self#block _x0 in +let _self = _self#option (fun _self -> fun ( _x0,_x1) -> let _self = _self#exception_ident _x0 in let _self = _self#block _x1 in _self) _x1 in +let _self = _self#option (fun _self -> _self#block) _x2 in + _self +|Debugger -> _self +method expression : expression -> 'self_type = fun { expression_desc = _x0;comment = _x1} -> let _self = _self#expression_desc _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in _self +method statement : statement -> 'self_type = fun { statement_desc = _x0;comment = _x1} -> let _self = _self#statement_desc _x0 in +let _self = _self#option (fun _self -> unknown _self) _x1 in _self +method variable_declaration : variable_declaration -> 'self_type = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> let _self = _self#ident _x0 in +let _self = _self#option (fun _self -> _self#expression) _x1 in _self +method string_clause : string_clause -> 'self_type = fun ( _x0,_x1) -> let _self = _self#case_clause _x1 in _self +method int_clause : int_clause -> 'self_type = fun ( _x0,_x1) -> let _self = _self#case_clause _x1 in _self +method case_clause : case_clause -> 'self_type = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> let _self = _self#block _x0 in +let _self = _self#option (fun _self -> unknown _self) _x2 in _self +method block : block -> 'self_type = _self#list (fun _self -> _self#statement) +method program : program -> 'self_type = fun { block = _x0;exports = _x1;export_set = _x2} -> let _self = _self#block _x0 in _self +method deps_program : deps_program -> 'self_type = fun { program = _x0;modules = _x1;side_effect = _x2} -> let _self = _self#program _x0 in +let _self = _self#required_modules _x1 in +let _self = _self#option (fun _self -> unknown _self) _x2 in _self + end + end module Js_pass_scope : sig #1 "js_pass_scope.mli" @@ -385114,22 +385153,19 @@ let count_collects (* collect used status*) (stats : int Hash_ident.t) (* collect all def sites *) - (defined_idents : J.variable_declaration Hash_ident.t) : Js_fold.fold + (defined_idents : J.variable_declaration Hash_ident.t) : Js_iter.iter = object (self) - inherit Js_fold.fold - + inherit Js_iter.iter method! variable_declaration ({ident; value ; property = _ ; ident_info = _} as v) = Hash_ident.add defined_idents ident v; match value with - | None -> - self + | None -> () | Some x -> self#expression x - method! ident id = add_use stats id; self - + method! ident id = add_use stats id end @@ -385138,7 +385174,7 @@ let get_stats (program : J.program) : J.variable_declaration Hash_ident.t let stats : int Hash_ident.t = Hash_ident.create 83 in let defined_idents : J.variable_declaration Hash_ident.t = Hash_ident.create 83 in let my_export_set = program.export_set in - let _ : Js_fold.fold = (count_collects stats defined_idents) #program program in + (count_collects stats defined_idents) #program program; post_process_stats my_export_set defined_idents stats end diff --git a/lib/4.06.1/whole_compiler.ml.d b/lib/4.06.1/whole_compiler.ml.d index 0129a2ea27..4f56853e25 100644 --- a/lib/4.06.1/whole_compiler.ml.d +++ b/lib/4.06.1/whole_compiler.ml.d @@ -194,6 +194,7 @@ ../lib/4.06.1/whole_compiler.ml: ./core/js_fun_env.mli ../lib/4.06.1/whole_compiler.ml: ./core/js_implementation.ml ../lib/4.06.1/whole_compiler.ml: ./core/js_implementation.mli +../lib/4.06.1/whole_compiler.ml: ./core/js_iter.ml ../lib/4.06.1/whole_compiler.ml: ./core/js_long.ml ../lib/4.06.1/whole_compiler.ml: ./core/js_long.mli ../lib/4.06.1/whole_compiler.ml: ./core/js_map.ml diff --git a/lib/es6/js_exn.mjs b/lib/es6/js_exn.mjs index e4be563155..6c57d44abb 100644 --- a/lib/es6/js_exn.mjs +++ b/lib/es6/js_exn.mjs @@ -2,6 +2,8 @@ import * as Caml_js_exceptions from "./caml_js_exceptions.mjs"; +var anyToExnInternal = Caml_js_exceptions.internalToOCamlException; + function raiseError(str) { throw new Error(str); } @@ -34,6 +36,7 @@ var $$Error$1 = Caml_js_exceptions.$$Error; export { $$Error$1 as $$Error, + anyToExnInternal , raiseError , raiseEvalError , raiseRangeError , diff --git a/lib/js/js_exn.js b/lib/js/js_exn.js index 1636c41f97..2eb7d891c4 100644 --- a/lib/js/js_exn.js +++ b/lib/js/js_exn.js @@ -2,6 +2,8 @@ var Caml_js_exceptions = require("./caml_js_exceptions.js"); +var anyToExnInternal = Caml_js_exceptions.internalToOCamlException; + function raiseError(str) { throw new Error(str); } @@ -33,6 +35,7 @@ function raiseUriError(str) { var $$Error$1 = Caml_js_exceptions.$$Error; exports.$$Error = $$Error$1; +exports.anyToExnInternal = anyToExnInternal; exports.raiseError = raiseError; exports.raiseEvalError = raiseEvalError; exports.raiseRangeError = raiseRangeError; diff --git a/ocaml-tree/fold_maker.js b/ocaml-tree/fold_maker.js index 882d7b8771..cf63f19962 100644 --- a/ocaml-tree/fold_maker.js +++ b/ocaml-tree/fold_maker.js @@ -1,5 +1,7 @@ //@ts-check var assert = require("assert"); +var node_types = require("./node_types"); +var init = node_types.init; /** * * @typedef {import('./node_types').Node} Node @@ -8,91 +10,110 @@ var assert = require("assert"); /** * * @param {{name:string, def:Node}} typedef + * @param {Set} allNames * @returns {string} */ -function mkMethod({ name, def }) { - return `method ${name} : ${name} -> 'self_type = ${mkBody(def)} `; +function mkMethod({ name, def }, allNames) { + return `method ${name} : ${name} -> 'self_type = ${mkBody(def, allNames)} `; } - -function init(n, fn) { - var arr = Array(n); - for (let i = 0; i < n; ++i) { - arr[i] = fn(i); - } - return arr; -} - +var skip = `unknown _self`; /** * @param {Node} def + * @param {Set} allNames */ -function mkBody(def) { +function mkBody(def, allNames) { // @ts-ignore assert(def !== undefined); switch (def.type) { case "type_constructor_path": - if (def.children.length === 1) { - return `o#${def.children[0].text}`; - } else { - // [ extended_module_path ..] - return `o#unknown`; + var basic = node_types.isSupported(def, allNames); + if (basic !== undefined) { + return `_self#${basic}`; } + return skip; case "constructed_type": // FIXME var [list, base] = [...def.children].reverse(); - return `${mkBody(list)} (fun o -> ${mkBody(base)})`; + return `${mkBody(list, allNames)} (fun _self -> ${mkBody( + base, + allNames + )})`; case "record_declaration": var len = def.children.length; var args = init(len, (i) => `_x${i}`); var pat_exp = init(len, (i) => { - return `${def.children[i].children[0].text} = ${args[i]}`; + return `${def.children[i].mainText} = ${args[i]}`; }); /** * @type {string[]} */ - var body = args.map((x, i) => { - var ty = def.children[i].children[1]; - return `let o = ${mkBody(ty)} ${x} in`; - }); - return `fun { ${pat_exp.join(";")}} -> ${body.join("\n")} o`; + var body = args + .map((x, i) => { + var ty = def.children[i].children[1]; + return mkBodyApply(ty, allNames, x); + }) + .filter(Boolean); + return `fun { ${pat_exp.join(";")}} -> ${body.join("\n")} _self`; case "variant_declaration": var len = def.children.length; - var branches = def.children.map((branch) => mkBranch(branch)); + var branches = def.children.map((branch) => mkBranch(branch, allNames)); return `function \n| ${branches.join("\n|")}`; case "tuple_type": var len = def.children.length; var args = init(len, (i) => `_x${i}`); - var body = args.map( - (x, i) => `let o = ${mkBody(def.children[i])} ${x} in` - ); - return `fun ( ${args.join(",")}) -> ${body.join(" ")} o`; + var body = args + .map((x, i) => mkBodyApply(def.children[i], allNames, x)) + .filter(Boolean); + return `fun ( ${args.join(",")}) -> ${body.join(" ")} _self`; default: throw new Error(`unkonwn ${def.type}`); } } + +/** + * + * @param {Node} ty + * @param {Set} allNames + * @param {string} arg + */ +function mkBodyApply(ty, allNames, arg) { + var fn = mkBody(ty, allNames); + if (fn === skip) { + return ``; + } + return `let _self = ${fn} ${arg} in`; +} + /** * * @param {Node} branch * branch is constructor_declaration + * @param {Set} allNames * @returns {string} */ -function mkBranch(branch) { +function mkBranch(branch, allNames) { // @ts-ignore assert(branch?.type === "constructor_declaration"); var [{ text }, ...rest] = branch.children; // TODO: add inline record support var len = rest.length; - if (len !== 0) { - var args = init(len, (i) => `_x${i}`); - var pat_exp = `${text} ( ${args.join(",")}) `; - var body = args.map((x, i) => { - var ty = rest[i]; - return `let o = ${mkBody(ty)} ${x} in`; - }); - return `${pat_exp} -> \n${body.join("\n")}\n o`; - } else { - return `${text} -> o`; + if (len === 0) { + return `${text} -> _self `; } + + var args = init(len, (i) => `_x${i}`); + var pat_exp = `${text} ( ${args.join(",")}) `; + var body = args + .map((x, i) => { + var ty = rest[i]; + return mkBodyApply(ty, allNames, x); + }) + .filter(Boolean); + if(body.length === 0){ + return `${text} _ -> _self` + } + return `${pat_exp} -> \n${body.join("\n")}\n _self`; } /** @@ -101,25 +122,22 @@ function mkBranch(branch) { * @returns {string} */ function make(typedefs) { - var output = typedefs.map(mkMethod); + var allNames = new Set([...typedefs.map((x) => x.name), "option", "list"]); + var output = typedefs.map((x) => mkMethod(x, allNames)); var o = ` open J - class virtual fold = - object ((o : 'self_type)) - method unknown : 'a. 'a -> 'self_type = fun _ -> o - method string : string -> 'self_type = fun _ -> o + let [@inline] unknown _self _ = _self + class fold = + object ((_self : 'self_type)) method option : 'a. ('self_type -> 'a -> 'self_type) -> 'a option -> 'self_type = - fun _f_a -> function | None -> o | Some _x -> let o = _f_a o _x in o + fun _f_a -> function | None -> _self | Some _x -> let _self = _f_a _self _x in _self method list : 'a. ('self_type -> 'a -> 'self_type) -> 'a list -> 'self_type = fun _f_a -> function - | [] -> o - | _x :: _x_i1 -> let o = _f_a o _x in let o = o#list _f_a _x_i1 in o - method int32 : int32 -> 'self_type = fun _ -> o - method int : int -> 'self_type = fun _ -> o - method bool : bool -> 'self_type = fun _ -> o + | [] -> _self + | _x :: _x_i1 -> let _self = _f_a _self _x in let _self = _self#list _f_a _x_i1 in _self ${output.join("\n")} end `; diff --git a/ocaml-tree/iter_maker.js b/ocaml-tree/iter_maker.js new file mode 100644 index 0000000000..75853ce657 --- /dev/null +++ b/ocaml-tree/iter_maker.js @@ -0,0 +1,147 @@ +//@ts-check +var assert = require("assert"); +var node_types = require("./node_types"); +var init = node_types.init; +/** + * + * @typedef {import('./node_types').Node} Node + */ + +/** + * + * @param {{name:string, def:Node}} typedef + * @param {Set} allNames + * @returns {string} + */ +function mkMethod({ name, def }, allNames) { + return `method ${name} : ${name} -> unit = ${mkBody(def, allNames)} `; +} + +var skip = `unknown _self`; + +/** + * @param {Node} def + * @param {Set} allNames + */ +function mkBody(def, allNames) { + // @ts-ignore + assert(def !== undefined); + switch (def.type) { + case "type_constructor_path": + var basic = node_types.isSupported(def, allNames); + if (basic !== undefined) { + return `_self#${basic}`; + } + return skip; + case "constructed_type": + // FIXME + var [list, base] = [...def.children].reverse(); + return `${mkBody(list, allNames)} (fun _self -> ${mkBody( + base, + allNames + )})`; + case "record_declaration": + var len = def.children.length; + var args = init(len, (i) => `_x${i}`); + var pat_exp = init(len, (i) => { + return `${def.children[i].mainText} = ${args[i]}`; + }); + + /** + * @type {string[]} + */ + var body = args + .map((x, i) => { + var ty = def.children[i].children[1]; + return mkBodyApply(ty, allNames, x); + }) + .filter(Boolean); + return `fun { ${pat_exp.join(";")}} -> begin ${body.join(";")} end`; + case "variant_declaration": + var len = def.children.length; + var branches = def.children.map((branch) => mkBranch(branch, allNames)); + return `function \n| ${branches.join("\n|")}`; + case "tuple_type": + var len = def.children.length; + var args = init(len, (i) => `_x${i}`); + var body = args + .map((x, i) => mkBodyApply(def.children[i], allNames, x)) + .filter(Boolean); + return `fun ( ${args.join(",")}) -> begin ${body.join(";")} end`; + default: + throw new Error(`unkonwn ${def.type}`); + } +} + +/** + * + * @param {Node} ty + * @param {Set} allNames + * @param {string} arg + */ +function mkBodyApply(ty, allNames, arg) { + var fn = mkBody(ty, allNames); + if (fn === skip) { + return ``; + } + return `${fn} ${arg}`; +} + +/** + * + * @param {Node} branch + * branch is constructor_declaration + * @param {Set} allNames + * @returns {string} + */ +function mkBranch(branch, allNames) { + // @ts-ignore + assert(branch?.type === "constructor_declaration"); + var [{ text }, ...rest] = branch.children; + // TODO: add inline record support + var len = rest.length; + if (len === 0) { + return `${text} -> ()`; + } + var args = init(len, (i) => `_x${i}`); + var pat_exp = `${text} ( ${args.join(",")}) `; + var body = args + .map((x, i) => { + var ty = rest[i]; + return mkBodyApply(ty, allNames, x); + }) + .filter(Boolean); + if (body.length === 0) { + return `${text} _ -> ()`; + } + return `${pat_exp} -> \n begin ${body.join(";")} end`; +} + +/** + * + * @param {{name : string, def: Node}[]} typedefs + * @returns {string} + */ +function make(typedefs) { + var allNames = new Set([...typedefs.map((x) => x.name), "option", "list"]); + var output = typedefs.map((x) => mkMethod(x, allNames)); + var o = ` + open J + let unknown _self _ = () + class iter = + object ((_self : 'self_type)) + method option : + 'a. ('self_type -> 'a -> unit) -> 'a option -> unit = + fun _f_a -> function | None -> () | Some _x -> _f_a _self _x + method list : + 'a. ('self_type -> 'a -> unit) -> 'a list -> unit = + fun _f_a -> + function + | [] -> () + | _x :: _x_i1 -> _f_a _self _x ; _self#list _f_a _x_i1 + ${output.join("\n")} + end + `; + return o; +} +exports.make = make; diff --git a/ocaml-tree/map_maker.js b/ocaml-tree/map_maker.js index 301b95a1c2..9f0ba11e34 100644 --- a/ocaml-tree/map_maker.js +++ b/ocaml-tree/map_maker.js @@ -1,129 +1,141 @@ //@ts-check var assert = require("assert"); - +var node_types = require("./node_types"); +var init = node_types.init; /** * @typedef {import('./node_types').Node} Node */ - /** - * * @param {{name:string, def:Node}} typedef + * @param {Set} allNames * @returns {string} */ -function mkMethod({ name, def }) { - return `method ${name} : ${name} -> ${name} = ${mkBody(def)} `; -} - -function init(n, fn) { - var arr = Array(n); - for (let i = 0; i < n; ++i) { - arr[i] = fn(i); - } - return arr; +function mkMethod({ name, def }, allNames) { + return `method ${name} : ${name} -> ${name} = ${mkBody(def, allNames)} `; } +var skip = `unknown`; /** * @param {Node} def + * @param {Set} allNames */ -function mkBody(def) { +function mkBody(def, allNames) { // @ts-ignore assert(def !== undefined); switch (def.type) { case "type_constructor_path": - if (def.children.length === 1) { - return `o#${def.children[0].text}`; - } else { - // [ extended_module_path ..] - return `o#unknown`; + var basic = node_types.isSupported(def, allNames); + if (basic !== undefined) { + return `_self#${basic}`; } + return skip; case "constructed_type": // FIXME var [list, base] = [...def.children].reverse(); - return `${mkBody(list)} (fun o -> ${mkBody(base)})`; + return `${mkBody(list, allNames)} (fun _self -> ${mkBody( + base, + allNames + )})`; case "record_declaration": var len = def.children.length; var args = init(len, (i) => `_x${i}`); var pat_exp = init(len, (i) => { - return `${def.children[i].children[0].text} = ${args[i]}`; - }); - - /** - * @type {string[]} - */ - var body = args.map((x, i) => { - var ty = def.children[i].children[1]; - return `let ${x} = ${mkBody(ty)} ${x} in`; + return `${def.children[i].mainText} = ${args[i]}`; }); - return `fun { ${pat_exp.join(";")}} -> ${body.join("\n")} {${pat_exp.join( - ";" - )}}`; + var record_body = args + .map((arg, i) => { + var ty = def.children[i].children[1]; + return mkBodyApply(ty, allNames, arg); + }) + .filter(Boolean); + return `fun { ${pat_exp.join(";")}} -> ${record_body.join( + "\n" + )} {${pat_exp.join(";")}}`; case "variant_declaration": var len = def.children.length; - var branches = def.children.map((branch) => mkBranch(branch)); + var branches = def.children.map((branch) => mkBranch(branch, allNames)); return `function \n| ${branches.join("\n|")}`; case "tuple_type": var len = def.children.length; var args = init(len, (i) => `_x${i}`); - var body = args.map( - (x, i) => `let ${x} = ${mkBody(def.children[i])} ${x} in` - ); - return `fun ( ${args.join(",")}) -> ${body.join(" ")} ${args.join(",")}`; + var tuple_body = args + .map((x, i) => mkBodyApply(def.children[i], allNames, x)) + .filter(Boolean); + return `fun ( ${args.join(",")}) -> ${tuple_body.join(" ")} ${args.join( + "," + )}`; default: - throw new Error(`unkonwn ${def.type}`); + throw new Error(`unknown ${def.type}`); } } +/** + * + * @param {Node} ty + * @param {Set} allNames + * @param {string} arg + */ +function mkBodyApply(ty, allNames, arg) { + var fn = mkBody(ty, allNames); + if (fn === skip) { + return ``; + } + return `let ${arg} = ${fn} ${arg} in `; +} /** * * @param {Node} branch * branch is constructor_declaration + * @param {Set} allNames * @returns {string} */ -function mkBranch(branch) { +function mkBranch(branch, allNames) { // @ts-ignore assert(branch?.type === "constructor_declaration"); var [{ text }, ...rest] = branch.children; // TODO: add inline record support var len = rest.length; - if (len !== 0) { - var args = init(len, (i) => `_x${i}`); - var pat_exp = `${text} ( ${args.join(",")}) `; - var body = args.map((x, i) => { - var ty = rest[i]; - return `let ${x} = ${mkBody(ty)} ${x} in`; - }); - return `${pat_exp} -> \n${body.join("\n")}\n${pat_exp}`; - } else { - return `${text} -> ${text}`; + if (len === 0) { + return `${text} as v -> v`; } + + var args = init(len, (i) => `_x${i}`); + var pat_exp = `${text} ( ${args.join(",")}) `; + var body = args + .map((x, i) => { + var ty = rest[i]; + return mkBodyApply(ty, allNames, x); + }) + .filter(Boolean); + if(body.length === 0) { + return `${text} _ as v -> v ` + } + return `${pat_exp} -> \n${body.join("\n")}\n${pat_exp}`; } /** * * @param {{name:string, def:Node}[]} typedefs */ function make(typedefs) { - var o = typedefs.map(mkMethod); + var allNames = new Set([...typedefs.map((x) => x.name), "option", "list"]); + var o = typedefs.map((x) => mkMethod(x, allNames)); var output = ` open J -class virtual map = object -((o : 'self_type)) -method unknown : 'a. 'a -> 'a = fun x -> x -method string : string -> string = fun x -> x +let unknown : 'a. 'a -> 'a = fun x -> x +class map = object +((_self : 'self_type)) method option : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a option -> 'a_out option = fun _f_a -> - function | None -> None | Some _x -> let _x = _f_a o _x in Some _x + function | None -> None | Some _x -> let _x = _f_a _self _x in Some _x method list : 'a 'a_out. ('self_type -> 'a -> 'a_out) -> 'a list -> 'a_out list = fun _f_a -> function | [] -> [] | _x :: _x_i1 -> - let _x = _f_a o _x in - let _x_i1 = o#list _f_a _x_i1 in _x :: _x_i1 -method int32 : int32 -> int32 = fun x -> x -method int : int -> int = fun x -> x -method bool : bool -> bool = fun x -> x + let _x = _f_a _self _x in + let _x_i1 = _self#list _f_a _x_i1 in _x :: _x_i1 ${o.join("\n")} end `; diff --git a/ocaml-tree/node_types.js b/ocaml-tree/node_types.js index f4fb2c4f41..13faa712c9 100644 --- a/ocaml-tree/node_types.js +++ b/ocaml-tree/node_types.js @@ -6,6 +6,9 @@ class Node { this.text = text; this.children = children; } + get mainText() { + return this.children[0].text; + } } /** @@ -30,18 +33,66 @@ function nodeToObject(node) { function getTypeDefs(parseOutput) { var rootNode = parseOutput.rootNode; var compilationUnit = nodeToObject(rootNode); - var type_definition = compilationUnit.children[0]; - var typedefs = type_definition.children.map((x) => { - var children = x.children; - var len = children.length; - return { - name: children[len - 2].text, - def: children[len - 1], - params: children.slice(0, len - 2), - }; - }); + var type_definitions = compilationUnit.children; + + // filter toplevel types has item_attribute + var has_deriving_type_definitions = type_definitions.filter( + (type_defintion) => { + var children = type_defintion.children; + var last = children[children.length - 1]; + var is_attribute = last.children[last.children.length - 1]; + return is_attribute.type === "item_attribute"; + } + ); + var typedefs = has_deriving_type_definitions + .map((type_definition) => { + return type_definition.children.map((x) => { + var children = x.children; + var len = children.length; + return { + name: children[0].text, // we ask no type parameter redefined + def: children[1], // there maybe trailing attributes + // params: children.slice(0, len - 2), + }; + }); + }) + .reduce((x, y) => x.concat(y)); return typedefs; } + +/** + * + * @param {Node} def + * @returns {string | undefined} + * + * Note visitor may have different requirements against + * `to_string` where more information is appreciated + * + * Here the case when it is not supported: + * - It is an external type: M.t + * - it is an foreign type : xx (xx does not belong to recursive types) + */ +function isSupported(def, allNames) { + if (def.children.length === 1) { + var basic = def.children[0].text; + if (allNames.has(basic)) { + return basic; + } + return; + } + return; +} +/** + * @template T + * @param {number} n + * @param {(_ : number) => T} fn + * @returns {T[]} + */ +function init(n, fn) { + return Array.from({ length: n }, (_, i) => fn(i)); +} +exports.init = init; +exports.isSupported = isSupported; exports.getTypedefs = getTypeDefs; exports.nodeToObject = nodeToObject; exports.Node = Node; diff --git a/ocaml-tree/test.js b/ocaml-tree/test.js index b36f24f56c..768fd7c6ef 100644 --- a/ocaml-tree/test.js +++ b/ocaml-tree/test.js @@ -7,7 +7,7 @@ var P = require("tree-sitter"); var p = new P(); p.setLanguage(OCaml); -var { Node, getTypedefs } = require("./node_types.js"); +var { Node, getTypedefs, nodeToObject } = require("./node_types.js"); // https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/preview var nodeFormatter = { @@ -32,6 +32,10 @@ var nodeFormatter = { return display; }, }; +if (globalThis.devtoolsFormatters === undefined) { + globalThis.devtoolsFormatters = []; +} +globalThis.devtoolsFormatters.push(nodeFormatter); // only make senses in browser // function visual(obj, formatter) { @@ -58,13 +62,12 @@ var y = p.parse(fs.readFileSync(path.join(j_dir, "j.ml"), "utf8")); */ var typedefs = getTypedefs(y); -if (globalThis.devtoolsFormatters === undefined) { - globalThis.devtoolsFormatters = []; -} -globalThis.devtoolsFormatters.push(nodeFormatter); var map_maker = require("./map_maker"); var fold_maker = require("./fold_maker"); +var iter_maker = require("./iter_maker"); var fold = fold_maker.make(typedefs); var map = map_maker.make(typedefs); -console.log(fold, map); +var iter = iter_maker.make(typedefs); +// console.log(fold, map); +fs.writeFileSync(path.join(j_dir, "js_iter.ml"), iter, "utf8"); diff --git a/ocaml-tree/wasm.js b/ocaml-tree/wasm.js index e3880442c4..e3b1769b2c 100644 --- a/ocaml-tree/wasm.js +++ b/ocaml-tree/wasm.js @@ -16,6 +16,9 @@ for (let i = 0; i < process.argv.length; ++i) { case "-fold": mode = "fold"; break; + case "-iter": + mode = "iter"; + break; case "-i": ++i; input = process.argv[i]; @@ -30,7 +33,7 @@ var source = fs.readFileSync(input, "utf8"); var node_types = require("./node_types"); var map_maker = require("./map_maker"); var fold_maker = require("./fold_maker"); - +var iter_maker = require("./iter_maker"); // var p = new P() (async () => { await P.init(); @@ -46,5 +49,8 @@ var fold_maker = require("./fold_maker"); case "fold": fs.writeFileSync(output, fold_maker.make(typedefs), "utf8"); break; + case "iter": + fs.writeFileSync(output, iter_maker.make(typedefs), "utf8"); + break; } })(); diff --git a/scripts/ninja.js b/scripts/ninja.js index 98f31e32fe..d4cf86dbbf 100755 --- a/scripts/ninja.js +++ b/scripts/ninja.js @@ -1584,7 +1584,8 @@ o core/js_fold.ml: p4of core/j.ml flags = -fold o core/js_map.ml: p4of core/j.ml flags = -map - +o core/js_iter.ml: p4of core/j.ml + flags = -iter o common/bs_version.ml : mk_bsversion build_version.js ../package.json o ../${