Skip to content

Commit

Permalink
revert some diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Nov 26, 2019
1 parent a7d418d commit aa48e4b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion compiler/num-testsuite/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let flush_all () = flush stdout; flush stderr;;
let message s = print_string s; print_newline ();;

let error_occurred = ref false;;
let immediate_failure = ref false;;
let immediate_failure = ref true;;

let error () =
if !immediate_failure then exit 2 else begin
Expand Down
4 changes: 2 additions & 2 deletions runtime/dynlink.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var current_libs = [0, joo_global_object]
//Provides: caml_dynlink_open_lib
//Requires: current_libs, caml_failwith
function caml_dynlink_open_lib (_mode,file) {
var name = file;
var name = file.toString();
joo_global_object.console.log("Dynlink: try to open ", name);
//caml_failwith("file not found: "+name)
current_libs.push({});
Expand All @@ -39,7 +39,7 @@ function caml_dynlink_close_lib (idx) {
//Provides: caml_dynlink_lookup_symbol
//Requires: current_libs
function caml_dynlink_lookup_symbol (idx, fun_name) {
var name = fun_name;
var name = fun_name.toString();
joo_global_object.console.log("Dynlink: look for symbol ", name);
if(current_libs[idx] && current_libs[idx][name])
return current_libs[idx][name];
Expand Down
6 changes: 2 additions & 4 deletions runtime/toplevel.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ function caml_reify_bytecode (code, _sz) {
//Requires: caml_failwith
//Version: >= 4.08
function caml_reify_bytecode (code, _sz,_) {
if(joo_global_object.toplevelCompile) {
var x = joo_global_object.toplevelCompile(code);
return [0, 0, x];
}
if(joo_global_object.toplevelCompile)
return [0, 0, joo_global_object.toplevelCompile(code)];
else caml_failwith("Toplevel not initialized (toplevelCompile)")
}

Expand Down
1 change: 0 additions & 1 deletion toplevel/examples/lwt_toplevel/dune
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
--toplevel
--disable shortvar
--noruntime
--pretty
%{lib:js_of_ocaml-compiler:runtime.js}
%{lib:js_of_ocaml-compiler:toplevel.js}
%{lib:js_of_ocaml-compiler:dynlink.js}
Expand Down
1 change: 1 addition & 0 deletions toplevel/lib/jsooTop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ let setup =
res);
Js.Unsafe.global##.toplevelReloc
:= Js.Unsafe.callback (fun name ->
let name = Js.to_string name in
Js_of_ocaml_compiler.Ocaml_compiler.Symtable.reloc_ident name);
())

Expand Down

0 comments on commit aa48e4b

Please sign in to comment.