Browse files

[fix] compiler, js: Take care of js cleaning at linking (the test sho…

…uld be a bit more restrictive)
  • Loading branch information...
1 parent e970f75 commit 781dee603f76e197aa190264411e78115664be56 @BourgerieQuentin BourgerieQuentin committed Sep 25, 2012
Showing with 1 addition and 4 deletions.
  1. +1 −4 compiler/qmljsimp/imp_Compiler.ml
View
5 compiler/qmljsimp/imp_Compiler.ml
@@ -256,10 +256,7 @@ let compile
#<If:JS_IMP$contains "time"> Printf.printf "clean up: %fs\n%!" (_chrono.Chrono.read ()); _chrono.Chrono.restart () #<End>;
#<If:JS_IMP$contains "print"> ignore (PassTracker.file ~filename:"js_imp_7_cleanup" _outputer js_code) #<End>;
let js_code =
- let keep = match ObjectFiles.compilation_mode () with
- | `linking -> (fun _ -> false) (* We can clean all non-used idents *)
- | _ -> (fun i -> JsIdentSet.mem i exported)
- in
+ let keep = (fun i -> JsIdentSet.mem i exported) in
Imp_Cleaning.process_code ~keep js_code
in

0 comments on commit 781dee6

Please sign in to comment.