Skip to content

Commit b3af571

Browse files
committed
Remove ml from bench.
1 parent a2de6e5 commit b3af571

File tree

6 files changed

+1
-35437
lines changed

6 files changed

+1
-35437
lines changed

jscomp/syntax/benchmarks/Benchmark.ml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,11 @@ end = struct
186186
| Print -> "printer"
187187

188188
(* TODO: we could at Reason here *)
189-
type lang = Ocaml | Rescript
189+
type lang = Rescript
190190
let string_of_lang lang =
191191
match lang with
192-
| Ocaml -> "ocaml"
193192
| Rescript -> "rescript"
194193

195-
let parse_ocaml src filename =
196-
let lexbuf = Lexing.from_string src in
197-
Location.init lexbuf filename;
198-
Parse.implementation lexbuf
199-
200194
let parse_rescript src filename =
201195
let p = Parser.make src filename in
202196
let structure = ResParser.parse_implementation p in
@@ -214,10 +208,6 @@ end = struct
214208
fun _ ->
215209
let _ = Sys.opaque_identity (parse_rescript src filename) in
216210
()
217-
| Ocaml, Parse ->
218-
fun _ ->
219-
let _ = Sys.opaque_identity (parse_ocaml src filename) in
220-
()
221211
| Rescript, Print ->
222212
let p = Parser.make src filename in
223213
let ast = ResParser.parse_implementation p in
@@ -230,7 +220,6 @@ end = struct
230220
Doc.to_string ~width:80 (Printer.print_structure ast cmt_tbl))
231221
in
232222
()
233-
| _ -> fun _ -> ()
234223
in
235224
let b = Benchmark.make ~name ~f:benchmark_fn () in
236225
Benchmark.launch b;
@@ -239,16 +228,13 @@ end = struct
239228
let run () =
240229
let data_dir = "jscomp/syntax/benchmarks/data" in
241230
benchmark (Filename.concat data_dir "RedBlackTree.res") Rescript Parse;
242-
benchmark (Filename.concat data_dir "RedBlackTree.ml") Ocaml Parse;
243231
benchmark (Filename.concat data_dir "RedBlackTree.res") Rescript Print;
244232
benchmark
245233
(Filename.concat data_dir "RedBlackTreeNoComments.res")
246234
Rescript Print;
247235
benchmark (Filename.concat data_dir "Napkinscript.res") Rescript Parse;
248-
benchmark (Filename.concat data_dir "Napkinscript.ml") Ocaml Parse;
249236
benchmark (Filename.concat data_dir "Napkinscript.res") Rescript Print;
250237
benchmark (Filename.concat data_dir "HeroGraphic.res") Rescript Parse;
251-
benchmark (Filename.concat data_dir "HeroGraphic.ml") Ocaml Parse;
252238
benchmark (Filename.concat data_dir "HeroGraphic.res") Rescript Print
253239
end
254240

0 commit comments

Comments
 (0)