Skip to content

Commit

Permalink
Enable js-flatten by default and provide -D js-unflatten to disable it.
Browse files Browse the repository at this point in the history
  • Loading branch information
aduros committed Mar 7, 2015
1 parent 6ce8d49 commit 7ab3779
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ module Define = struct
| JavaVer
| JsClassic
| JsEs5
| JsFlatten
| JsUnflatten
| KeepOldOutput
| LoopUnrollMaxCost
| Macro
Expand Down Expand Up @@ -288,7 +288,7 @@ module Define = struct
| JavaVer -> ("java_ver", "<version:5-7> Sets the Java version to be targeted")
| JsClassic -> ("js_classic","Don't use a function wrapper and strict mode in JS output")
| JsEs5 -> ("js_es5","Generate JS for ES5-compliant runtimes")
| JsFlatten -> ("js_flatten","Generate classes to use fewer object property lookups")
| JsUnflatten -> ("js_unflatten","Generate nested objects for packages and types")
| KeepOldOutput -> ("keep_old_output","Keep old source files in the output directory (for C#/Java)")
| LoopUnrollMaxCost -> ("loop_unroll_max_cost","Maximum cost (number of expressions * iterations) before loop unrolling is canceled (default 250)")
| Macro -> ("macro","Defined when we compile code in the macro context")
Expand Down
2 changes: 1 addition & 1 deletion genjs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ let alloc_ctx com =
mappings = Rbuffer.create 16;
};
js_modern = not (Common.defined com Define.JsClassic);
js_flatten = Common.defined com Define.JsFlatten;
js_flatten = not (Common.defined com Define.JsUnflatten);
statics = [];
inits = [];
current = null_class;
Expand Down

0 comments on commit 7ab3779

Please sign in to comment.