Skip to content

Commit

Permalink
change non_export into no_export
Browse files Browse the repository at this point in the history
  • Loading branch information
Hongbo Zhang committed Jul 7, 2016
1 parent a28a1e8 commit bd7cf26
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions jscomp/jsoo_driver.ml
Expand Up @@ -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; *)
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions jscomp/lam_compile_group.ml
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions jscomp/syntax/ppx_entry.ml
Expand Up @@ -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 () =
Expand All @@ -74,7 +74,7 @@ let reset () =
uncurry_type := false ;
obj_type_auto_uncurry := false ;
bs_class_type := false;
non_export := false
no_export := false



Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion jscomp/test/config1_test.ml
@@ -1,7 +1,7 @@

;;[@@@bs.config{
obj_type_auto_uncurry ;
non_export ;
no_export ;
}]
;;

Expand Down
2 changes: 1 addition & 1 deletion jscomp/test/config2_test.ml
@@ -1,7 +1,7 @@
[@@@bs.config{
obj_type_auto_uncurry ;
bs_class_type
(* non_export = true; *)
(* no_export = true; *)
}]


Expand Down
2 changes: 1 addition & 1 deletion 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
} ]

Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down

0 comments on commit bd7cf26

Please sign in to comment.