Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[cleanup] fixme: remove some of them

deprecated or resolved or present in dead code
  • Loading branch information...
commit f3fef854bc5cdf93840d5d704703c6933642a65f 1 parent 6c30f81
Mathieu Barbin authored
View
1  libqmlcompil/qmlDependencies.ml
@@ -637,7 +637,6 @@ let debug _f _x =
circular dependencies between libraries
*)
-(* FIXME FIXME FIXME FIXME: LE CLEAN UP VA JARTER DES TYPES, ATTENTION! *)
let reorder_toplevel val_ roots roots_addon create_groups lcode =
let lcode = flatten lcode in
(* FIXME: should i remove the pat vars from the dependencies? *)
View
80 opalib/opaEnv.ml
@@ -26,12 +26,12 @@
@author Mehdi Bouaziz
*)
-(**)
+(* depends *)
+module Arg = Base.Arg
+module Format = BaseFormat
+module String = BaseString
-(* FIXME *)
-open Base
-
-(* -- *)
+(* - *)
module Parameters =
struct
@@ -141,7 +141,6 @@ sig
val parse_options : unit -> unit
val get_options : unit -> opa_options
val echo_help : unit -> unit
- val echo_options : unit -> unit
(** Fill a pprocess environment from opa options. *)
val to_ppenv : opa_options -> Pprocess.env -> Pprocess.env
@@ -262,7 +261,7 @@ struct
f
let extra_split g =
- List.map Base.String.trim (Base.String.split (fun c -> List.mem c ['{'; '}'; ' '; ','; ';']) g)
+ List.map String.trim (String.split (fun c -> List.mem c ['{'; '}'; ' '; ','; ';']) g)
(** lib & js for ocaml compilation *)
let ccopt = MutableList.create ()
@@ -287,10 +286,10 @@ struct
OManager.error (
"I don't know what to do with arg @{<bright>%S@}@\n"^^
"@[<2>@{<bright>Hint@}:@\n"^^
- "expected extensions for @{<bright>--extra-lib@} are {%s}@]"
+ "expected extensions for @{<bright>--extra-lib@} are {%a}@]"
)
f
- (String.concat ", " (List.map (sprintf "\"%s\"") expected))
+ (Format.pp_list ", " (fun fmt -> Format.fprintf fmt "%S")) expected
let set_project_root dir =
try
@@ -342,7 +341,7 @@ struct
let add_full_extra_path s = List.iter add_extra_path (extra_split s)
let str_version =
- sprintf (
+ Printf.sprintf (
"Opa compiler (c) MLstate -- version %s -- build %d"
)
BuildInfos.opa_version_name
@@ -366,19 +365,19 @@ struct
let full_help = ref (fun () -> ())
let help_menu speclist () =
- let head = (sprintf
+ let head = Printf.sprintf
"---- OPA Compiler Help ----
Syntax is :
\"opa.exe [options] source1.opa [source2.opa ...]\"
where options are :
-" ) in
+" in
Arg.usage speclist head;
if not BuildInfos.is_release
then (
prerr_endline "\nYou can set the following environment variable if needed (VAR MEANING DEFAULT):\n" ;
- List.iter (fun (var, mess, _)-> prerr_endline (sprintf " %s \t-- %s" (String.escaped var) mess)) Env.envvar ;
+ List.iter (fun (var, mess, _)-> prerr_endline (Printf.sprintf " %s \t-- %s" (String.escaped var) mess)) Env.envvar ;
) ;
prerr_endline "\n-----------------------------\n"
@@ -395,12 +394,24 @@ where options are :
WarningClass.Arg.options () @
ObjectFiles.Arg.public_options @
[
- ("--api",Arg.Set generate_interface_and_compile," Generate interfaces (json and text) and continue compilation");
- ("--api-only",Arg.Set generate_interface," Generate interfaces (json and text) and exit");
+ (* a *)
+ "--api",
+ Arg.Set generate_interface_and_compile,
+ " Generate interfaces (json and text) and continue compilation"
+ ;
+
+ "--api-only",
+ Arg.Set generate_interface,
+ " Generate interfaces (json and text) and exit"
+ ;
+
(* ("--back-end", Arg.Symbol (available_back_end_list, back_end), (sprintf " Select a backend between %s (default is %s) [EXPERIMENTAL]" (String.concat ", " available_back_end_list) (string_of_available_back_end !back_end_wanted))); *)
(* b *)
- ("--build-dir", Arg.String (fun s -> build_dir := s), " set the build directory : default is _build. you must set an absolute path.");
+ "--build-dir",
+ Arg.String (fun s -> build_dir := s),
+ " set the build directory : default is _build. you must set an absolute path."
+ ;
(* c *)
"--ccopt",
@@ -487,8 +498,18 @@ where options are :
("--no-ei", Arg.Clear explicit_instantiation, "");
("--generate-interface",Arg.Set generate_interface," DEPRECATED (use --api-only instead)");
("--generate-interface-and-compile",Arg.Set generate_interface_and_compile," DEPRECATED (use --api instead)");
- ("--hacker-mode", Arg.Set hacker_mode, " Perform some usefull tricks when compiling the ocaml code for debugging purpose");
- ("--js-back-end", Arg.Symbol (available_js_back_end_list, js_back_end), (sprintf " Select a JS backend between %s (default is %s)" (String.concat ", " available_js_back_end_list) js_back_end_wanted_name));
+
+ "--hacker-mode",
+ Arg.Set hacker_mode,
+ " Perform some usefull tricks when compiling the ocaml code for debugging purpose"
+ ;
+
+ "--js-back-end",
+ Arg.Symbol (available_js_back_end_list, js_back_end),
+ Printf.sprintf " Select a JS backend between %s (default is %s)"
+ (String.concat ", " available_js_back_end_list) js_back_end_wanted_name
+ ;
+
("--js-as", Arg.spec_of_assoc js_serialize ["adhoc", `adhoc; "ast", `ast], " Compile the client into a json string, instead of the runtime ast directly");
("--js-no-cleanup", Arg.Clear js_cleanup, "");
("--js-no-local-inlining", Arg.Clear js_local_inlining, "");
@@ -572,7 +593,7 @@ where options are :
(** for js files, we use the extra-path feature *)
in
let preprocess acc line =
- let line = Base.String.trim line in
+ let line = String.trim line in
let len = String.length line in
if len = 0 then acc
else
@@ -580,7 +601,7 @@ where options are :
| '#' -> acc
| _ ->
(** split, and call preprocess_word *)
- let split = Base.String.split (function ' ' | '\t' | '\n' -> true | _ -> false) in
+ let split = String.split (function ' ' | '\t' | '\n' -> true | _ -> false) in
List.fold_left preprocess_word acc (split line)
in
let opack_options = File.lines_fold preprocess [] file in
@@ -623,23 +644,6 @@ where options are :
target_qmli := Option.default (!last_target_from_file ^ ".qmli") !target_opt;
target_dbgen_schema := Option.default (!last_target_from_file ^ ".dot") !target_opt
- let echo_options () =
-
- (match !filenames with
- | [] -> OManager.error "Where are my opa files ?"
- | filenames ->
- (* FIXME: OManager.printf ? *)
- prerr_endline
- (Printf.sprintf "I will compile file(s)\t: %s" (String.concat ", " filenames));
- );
-
- OManager.verbose "The @{<bright>%s@} will be\t: @{<bright>%s@}" (if !no_server <> Some true then "executable" else "server") !target;
- List.iter (
- fun (opt, name, mess) -> if opt then OManager.verbose "arg option: --%s : %s" name mess
- )
- [
- (!no_server <> Some true), "no-server", "The executable will not be a server";
- ]
end
(* Parse and get options, work with a side effect on module ArgParser *)
@@ -736,8 +740,6 @@ where options are :
let echo_help () = ArgParser.do_print_help ()
- let echo_options () = ArgParser.echo_options ()
-
(** Fill a pprocess environment from opa options. *)
let to_ppenv options env =
let env =
View
22 passes/pass_CompileTimeDirective.ml
@@ -22,30 +22,13 @@ module O = OpaEnv
let infos_ident =
[
- (*
- Seems to be in experimental/closure_private.opa only
- FIXME: remove
- *)
- "explicit_closure", (fun options -> C.E.bool options.O.closure);
-
- (*
- FIXME: is it really at runtime ?
- or is it old deprecated workarround
- *)
- "cps_mode", (fun options -> C.E.bool options.O.cps);
"cps_client_mode", (fun options -> C.E.bool options.O.cps_client);
- "closure_mode", (fun options -> C.E.bool options.O.closure);
-
- (* BEGIN used by xhtml.opa *)
- (*
- FIXME: is it the only dependency ??
- *)
"release", (fun options -> C.E.bool options.O.compile_release);
"opa_filenames", (fun options -> C.E.list
(List.map C.E.string options.O.filenames));
- (* FIXME, I guess we'd rather have [time_t] or [Date.date] than [int] *)
+ (* transformed into a [Date.date] using [int2time] *)
"compilation_date", (fun _ -> C.E.int (Time.in_milliseconds (
#<If:DIFFING>
Time.zero
@@ -59,9 +42,6 @@ let infos_ident =
"opa_git_version_hash", (fun _ -> C.E.string BuildInfos.opalang_git_sha);
"opa_date", (fun _ -> C.E.string BuildInfos.date);
"opa_is_release", (fun _ -> C.E.bool BuildInfos.is_release);
-
- (* END used by xhtml.opa *)
-
]
let infos_ident_names =
View
1  passes/surfaceAstDependencies.ml
@@ -509,7 +509,6 @@ let flatten_newval_newtype code =
circular dependencies between libraries
*)
-(* FIXME FIXME FIXME FIXME: LE CLEAN UP VA JARTER DES TYPES, ATTENTION! *)
let reorder_toplevel ?roots create_groups lcode =
debug "reorder" pp_code lcode;
let lcode = flatten_newval_newtype lcode in
View
8 passlib/passTracker.ml
@@ -16,9 +16,9 @@
along with OPA. If not, see <http://www.gnu.org/licenses/>.
*)
-(* FIXME: continue to hoist Base *)
-module String = Base.String
-module Marshal = Base.Marshal
+(* depends *)
+module String = BaseString
+module Marshal = BaseMarshal
let error fmt = OManager.error ("OpaTracker."^^fmt^^"\n")
@@ -98,14 +98,12 @@ let handle_close_out oc =
try close_out oc
with
| Sys_error s ->
- (* FIXME: warning instead ? *)
error "Output.start: cannot close_out in %s : %s" !directory s
let handle_close_in ic =
try close_in ic
with
| Sys_error s ->
- (* FIXME: warning instead ? *)
error "Input.start: cannot close_int in %s : %s" !directory s
let handle_mkdir path =
View
1  passlib/passdesign.ml
@@ -418,7 +418,6 @@ struct
e
| L.B (_, b) -> L.B (L.K (if !bug_rewriting then (-9) else 9), b)
| t -> t)
- (* FIXME: map_up*)
let code_elt code_elt = Lang.Walk.Elt.map_nonrec (expr code_elt) code_elt
let code env = List.map code_elt env
end
View
2  qmlcompilers/_tags
@@ -11,8 +11,6 @@
<qmljs_exe.{ml,byte,native}>: use_qmljsimp, use_qml2js, use_zip
<qmlCompilers.{ml,mli,byte,native}>: use_qmlslicer, use_passlib, use_opalang
-# FIXME:continue to refactore
-# until qmlc will provide common passes (next commit)
<*.{ml,mli,byte,native}>: use_qml2ocaml, use_qml2js
# explicit deps for linking
View
10 qmlflat/flat/flat_Bsl.ml
@@ -91,7 +91,10 @@ struct
uncps_level = 0 ;
}
- (* FIXME: this is ugly *)
+ (*
+ Collect warning about unprojected bypass, put it in the env,
+ and remove them from the State reference.
+ *)
let collect_segfault env =
let segfault =
List.fold_left (
@@ -115,7 +118,10 @@ struct
let bsltags = ref BslTags.default in
(fun s -> bsltags := s), (fun () -> !bsltags)
- (* FIXME: this is ugly, follow guidelines about error reporting *)
+ (*
+ Collecting error messages during projection of bypasses,
+ for outputing them all at the end (do not fail after the first error)
+ *)
let failure_projection fct bslkey t p =
match fct p with
| Some (BI.MetaCode projection) ->
View
13 qmljsimp/imp_SumCase.ml
@@ -15,13 +15,6 @@
You should have received a copy of the GNU Affero General Public License
along with OPA. If not, see <http://www.gnu.org/licenses/>.
*)
-(*
- Mathieu Tue Feb 8 12:22:20 CET 2011
- TODO: this is the first implementation of this module,
- this is quite naive and not particulary efficient.
- After first prototyping, we should improve the quality
- of the implementation.
-*)
(* depends *)
module Format = Base.Format
@@ -788,12 +781,6 @@ struct
type sum_case = FieldSet.t
- (*
- Mathieu Tue Feb 8 12:45:38 CET 2011
- FIXME:
- moi j'appelle ça une usine à gaz
- *)
-
type sum_content = {
ty : QmlAst.ty ;
sum_rev_prefix_path : rev_prefix_path ;
Please sign in to comment.
Something went wrong with that request. Please try again.