@@ -103,17 +103,6 @@ let implementation ~use_super_errors impl str : Js.Unsafe.obj =
103
103
let compile impl ~use_super_errors =
104
104
implementation ~use_super_errors impl
105
105
106
-
107
-
108
-
109
- (* let load_module cmi_path cmi_content cmj_name cmj_content =
110
- Js.create_file cmi_path cmi_content;
111
- Js_cmj_datasets.data_sets :=
112
- Map_string.add !Js_cmj_datasets.data_sets
113
- cmj_name (lazy (Js_cmj_format.from_string cmj_content))
114
- *)
115
-
116
-
117
106
let export (field : string ) v =
118
107
Js.Unsafe. set (Js.Unsafe. global) field v
119
108
;;
@@ -122,10 +111,8 @@ let export (field : string) v =
122
111
123
112
let dir_directory d =
124
113
Config. load_path := d :: ! Config. load_path
125
-
126
-
127
114
let () =
128
- dir_directory " /static/cmis "
115
+ dir_directory " /static"
129
116
130
117
let make_compiler name impl =
131
118
export name
@@ -141,15 +128,12 @@ let make_compiler name impl =
141
128
(fun _ code ->
142
129
(compile impl ~use_super_errors: true (Js. to_string code)));
143
130
" version" , Js.Unsafe. inject (Js. string (Bs_version. version));
144
- (* "load_module",
131
+ " load_module" ,
145
132
inject @@
146
133
Js. wrap_meth_callback
147
- (fun _ cmi_path cmi_content cmj_name cmj_content ->
148
- let cmj_bytestring = Js.to_bytestring cmj_content in
149
- (* HACK: force string tag to ASCII (9) to avoid
150
- * UTF-8 encoding *)
151
- Js.Unsafe.set cmj_bytestring "t" 9;
152
- load_module cmi_path cmi_content (Js.to_string cmj_name) cmj_bytestring); *)
134
+ (fun _ cmi_path cmi_content cmj_path cmj_content ->
135
+ Js. create_file cmi_path cmi_content;
136
+ Js. create_file cmj_path cmj_content);
153
137
|]))
154
138
let () = make_compiler " ocaml" Parse. implementation
155
139
0 commit comments