Skip to content

Commit

Permalink
[fix] @public_env: all functions should be kept on client side
Browse files Browse the repository at this point in the history
  • Loading branch information
OpaOnWindowsNow committed Aug 23, 2012
1 parent 4b73b88 commit 20c1cc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion compiler/opa/s3Passes.ml
Expand Up @@ -1797,7 +1797,6 @@ let pass_JavascriptCompilation =
) IdentSet.empty (Opa_Roots.roots_for_s3 ~no_server:false) in
(* instrumented closure should not be cleaned *)
let client_roots = IdentSet.fold (fun id set ->
let id = QmlRenamingMap.new_from_original client_finalenv.P.newFinalCompile_renaming_client id in
IdentSet.add id set
) (pass_InstrumentForClosureSerialization_instrumented()) client_roots
in
Expand Down
6 changes: 3 additions & 3 deletions compiler/qmlpasses/pass_InstrumentForClosureSerialization.ml
Expand Up @@ -318,9 +318,9 @@ let rewrite_identifiers always_serialize env annotmap code =
let process_code gamma annotmap code =
let always_serialize, code = detect_candidate_def code in
let need_instrumentation, need_rewrite = detect_candidate_call always_serialize code in
if not(need_rewrite) then (*return*) gamma, annotmap, code, IdentSet.empty else
let need_client_code = IdentSet.union need_instrumentation always_serialize in
let (gamma, annotmap, env), code = if not(IdentSet.is_empty need_instrumentation)
then generate_instrumented_functions need_instrumentation gamma annotmap code
else (gamma, annotmap, empty), code in
let annotmap, code = rewrite_identifiers always_serialize env annotmap code in
gamma, annotmap, code, need_instrumentation
let annotmap, code = if need_rewrite then rewrite_identifiers env annotmap code else (annotmap,code) in
gamma, annotmap, code, need_client_code

0 comments on commit 20c1cc4

Please sign in to comment.