Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] compiler, js: Keep also distant identifier (needed for closure …

…serialization)
  • Loading branch information...
commit 50327f1adfefef2cdc07a69186712aa7579fe699 1 parent 87293c9
@BourgerieQuentin BourgerieQuentin authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 compiler/qmljsimp/imp_Compiler.ml
View
7 compiler/qmljsimp/imp_Compiler.ml
@@ -256,7 +256,12 @@ 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 = (fun i -> JsIdentSet.mem i exported) in
+ let keep = (fun i -> JsIdentSet.mem i exported ||
+ match i with
+ | JsAst.ExprIdent i -> is_distant i
+ | _ -> false
+ )
+ in
Imp_Cleaning.process_code ~keep js_code
in
Please sign in to comment.
Something went wrong with that request. Please try again.