diff options
author | Eduardo Julian | 2017-02-27 18:54:25 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-02-27 18:54:25 -0400 |
commit | 19eb25c2f1263988f67ff72f632dea50b8e3f8dd (patch) | |
tree | c526039256b4c161367676c6533dd53a8dedcbde /luxc/src | |
parent | e35651387f0c18256ab704af4f62e454d75b5968 (diff) |
- console.log is now defined when starting compilation, and not when LuxRT is compiled, to avoid issues when compiling a partially-cached program.
Diffstat (limited to 'luxc/src')
-rw-r--r-- | luxc/src/lux/compiler/js.clj | 3 | ||||
-rw-r--r-- | luxc/src/lux/compiler/js/rt.clj | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/luxc/src/lux/compiler/js.clj b/luxc/src/lux/compiler/js.clj index b43ab5b4d..fa4bf9518 100644 --- a/luxc/src/lux/compiler/js.clj +++ b/luxc/src/lux/compiler/js.clj @@ -161,7 +161,8 @@ (let [!err! *err*] (defn compile-program [mode program-module resources-dir source-dirs target-dir] (do (init! resources-dir target-dir) - (let [m-action (|do [_ (&&cache/pre-load-cache! source-dirs + (let [m-action (|do [_ (&&/run-js! "var console = { log: print };") + _ (&&cache/pre-load-cache! source-dirs &&js-cache/load-def-value &&js-cache/install-all-defs-in-module &&js-cache/uninstall-all-defs-in-module) diff --git a/luxc/src/lux/compiler/js/rt.clj b/luxc/src/lux/compiler/js/rt.clj index e9dfa451b..b1c1aeb1b 100644 --- a/luxc/src/lux/compiler/js/rt.clj +++ b/luxc/src/lux/compiler/js/rt.clj @@ -1197,8 +1197,7 @@ (def LuxRT "LuxRT") (def compile-LuxRT - (|do [_ (&&/run-js! "var console = { log: print };") - :let [rt-object (str "{" (->> (merge lux-methods + (|do [:let [rt-object (str "{" (->> (merge lux-methods adt-methods i64-methods n64-methods |