From bd7cf26e1484470f8fd7433cb66015f7d4644038 Mon Sep 17 00:00:00 2001 From: Hongbo Zhang Date: Thu, 7 Jul 2016 14:48:07 -0400 Subject: [PATCH] change non_export into no_export --- jscomp/jsoo_driver.ml | 4 ++-- jscomp/lam_compile_group.ml | 10 +++++----- jscomp/syntax/ppx_entry.ml | 10 +++++----- jscomp/test/config1_test.ml | 2 +- jscomp/test/config2_test.ml | 2 +- jscomp/test/config2_test.mli | 2 +- jscomp/test/gpr_459_test.ml | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/jscomp/jsoo_driver.ml b/jscomp/jsoo_driver.ml index 4061089e73..28c27cf01c 100644 --- a/jscomp/jsoo_driver.ml +++ b/jscomp/jsoo_driver.ml @@ -42,7 +42,7 @@ let () = Js_config.set_env Browser; Clflags.unsafe_string := false -let implementation non_export ppf str = +let implementation no_export ppf str = let modulename = "Test" in (* let env = !Toploop.toplevel_env in *) (* Compmisc.init_path false; *) @@ -64,7 +64,7 @@ let implementation non_export ppf str = |> (* Printlambda.lambda ppf *) (fun lam -> let buffer = Buffer.create 1000 in let () = Js_dump.(pp_deps_program - (Lam_compile_group.compile ~filename:"" non_export + (Lam_compile_group.compile ~filename:"" no_export !finalenv !types_signature lam) (Ext_pp.from_buffer buffer)) in let v = Buffer.contents buffer in diff --git a/jscomp/lam_compile_group.ml b/jscomp/lam_compile_group.ml index dcfebfb31d..b459ae96bc 100644 --- a/jscomp/lam_compile_group.ml +++ b/jscomp/lam_compile_group.ml @@ -175,12 +175,12 @@ let compile_group ({filename = file_name; env;} as meta : Lam_stats.meta) (** Actually simplify_lets is kind of global optimization since it requires you to know whether it's used or not - [non_export] is only used in playground + [no_export] is only used in playground *) -let compile ~filename output_prefix non_export env _sigs +let compile ~filename output_prefix no_export env _sigs (lam : Lambda.lambda) = let export_idents = - if non_export then + if no_export then [] else Translmod.get_export_identifiers() in @@ -267,7 +267,7 @@ let compile ~filename output_prefix non_export env _sigs | Lprim {primitive = Pmakeblock (_,_,_); args = lambda_exports}, rest -> let coercion_groups, new_exports, new_export_set, export_map = - if non_export then + if no_export then [], [], Ident_set.empty, Ident_map.empty else List.fold_right2 @@ -403,7 +403,7 @@ let compile ~filename output_prefix non_export env _sigs (* Exporting ... *) let v = Lam_stats_export.export_to_cmj meta maybe_pure external_module_ids - (if non_export then Ident_map.empty else export_map) + (if no_export then Ident_map.empty else export_map) in (if not @@ Ext_string.is_empty filename then Js_cmj_format.to_file diff --git a/jscomp/syntax/ppx_entry.ml b/jscomp/syntax/ppx_entry.ml index 413024b252..fae0eff383 100644 --- a/jscomp/syntax/ppx_entry.ml +++ b/jscomp/syntax/ppx_entry.ml @@ -65,7 +65,7 @@ let record_as_js_object = ref false (* otherwise has an attribute *) let obj_type_as_js_obj_type = ref false let uncurry_type = ref false let obj_type_auto_uncurry = ref false -let non_export = ref false +let no_export = ref false let bs_class_type = ref false let reset () = @@ -74,7 +74,7 @@ let reset () = uncurry_type := false ; obj_type_auto_uncurry := false ; bs_class_type := false; - non_export := false + no_export := false @@ -430,9 +430,9 @@ let common_actions_table : let structural_config_table = String_map.of_list - (( "non_export" , + (( "no_export" , (fun x -> - non_export := ( + no_export := ( match x with |Some e -> Ast_payload.assert_bool_lit e | None -> true) @@ -482,7 +482,7 @@ let rewrite_implementation : (Parsetree.structure -> Parsetree.structure) ref = Ast_payload.as_record_and_process loc payload |> List.iter (make_call_back structural_config_table) ; let rest = unsafe_mapper.structure unsafe_mapper rest in - if !non_export then + if !no_export then [Str.include_ ~loc (Incl.mk ~loc (Mod.constraint_ ~loc diff --git a/jscomp/test/config1_test.ml b/jscomp/test/config1_test.ml index 189fdcd440..1505c6c8a1 100644 --- a/jscomp/test/config1_test.ml +++ b/jscomp/test/config1_test.ml @@ -1,7 +1,7 @@ ;;[@@@bs.config{ obj_type_auto_uncurry ; - non_export ; + no_export ; }] ;; diff --git a/jscomp/test/config2_test.ml b/jscomp/test/config2_test.ml index 2f54b40405..a2270ed191 100644 --- a/jscomp/test/config2_test.ml +++ b/jscomp/test/config2_test.ml @@ -1,7 +1,7 @@ [@@@bs.config{ obj_type_auto_uncurry ; bs_class_type - (* non_export = true; *) + (* no_export = true; *) }] diff --git a/jscomp/test/config2_test.mli b/jscomp/test/config2_test.mli index 2d4ad10e22..154a782acc 100644 --- a/jscomp/test/config2_test.mli +++ b/jscomp/test/config2_test.mli @@ -1,4 +1,4 @@ -[@@@bs.config {obj_type_auto_uncurry ; (* non_export = true *) +[@@@bs.config {obj_type_auto_uncurry ; (* no_export = true *) bs_class_type } ] diff --git a/jscomp/test/gpr_459_test.ml b/jscomp/test/gpr_459_test.ml index 705a98a512..5c0a9616e1 100644 --- a/jscomp/test/gpr_459_test.ml +++ b/jscomp/test/gpr_459_test.ml @@ -1,4 +1,4 @@ -[@@@bs.config{non_export}] +[@@@bs.config{no_export}] let suites : Mt.pair_suites ref = ref [] let test_id = ref 0