aboutsummaryrefslogtreecommitdiff
path: root/lux-bootstrapper/src/lux/analyser
diff options
context:
space:
mode:
authorEduardo Julian2021-07-08 23:59:00 -0400
committerEduardo Julian2021-07-08 23:59:00 -0400
commitf3e869d0246e956399ec31a074c6c6299ff73602 (patch)
treeba67c7713bbe4ec48232f58a4b324bd364111f95 /lux-bootstrapper/src/lux/analyser
parent2b909032e7a0bd10cd7db52067d2fb701bfa95e5 (diff)
Made sure the "phase" parameter of extensions is always usable (even across language boundaries)
Diffstat (limited to 'lux-bootstrapper/src/lux/analyser')
-rw-r--r--lux-bootstrapper/src/lux/analyser/proc/jvm.clj26
1 files changed, 15 insertions, 11 deletions
diff --git a/lux-bootstrapper/src/lux/analyser/proc/jvm.clj b/lux-bootstrapper/src/lux/analyser/proc/jvm.clj
index cc77bf72c..78362601d 100644
--- a/lux-bootstrapper/src/lux/analyser/proc/jvm.clj
+++ b/lux-bootstrapper/src/lux/analyser/proc/jvm.clj
@@ -854,7 +854,8 @@
=fields (&/map% (partial analyse-field analyse class-env) ?fields)
_ (&host/use-dummy-class class-decl super-class interfaces &/$None =fields methods)
=methods (&/map% (partial analyse-method analyse class-decl* class-env all-supers) methods)
- _ (check-method-completion all-supers =methods)
+ ;; TODO: Uncomment
+ ;; _ (check-method-completion all-supers =methods)
_ (compile-class class-decl super-class interfaces =inheritance-modifier =anns =fields =methods &/$Nil &/$None)
_ &/pop-dummy-name
:let [_ (println 'CLASS full-name)]
@@ -869,7 +870,8 @@
(defn- analyse-methods [analyse class-decl all-supers methods]
(|do [=methods (&/map% (partial analyse-method analyse class-decl &/$Nil all-supers) methods)
- _ (check-method-completion all-supers =methods)
+ ;; TODO: Uncomment
+ ;; _ (check-method-completion all-supers =methods)
=captured &&env/captured-vars]
(return (&/T [=methods =captured]))))
@@ -878,14 +880,16 @@
scope &/get-scope-name]
(return (&/T [module scope]))))
-(let [default-<init> (&/$ConstructorMethodSyntax (&/T [&/$PublicPM
- false
- &/$Nil
- &/$Nil
- &/$Nil
- &/$Nil
- &/$Nil
- (&/$Tuple &/$Nil)]))
+(let [default-<init> (fn [ctor-args]
+ (&/$ConstructorMethodSyntax (&/T [&/$PublicPM ;; privacy-modifier
+ false ;; strict
+ &/$Nil ;; anns
+ &/$Nil ;; gvars
+ &/$Nil ;; exceptions
+ &/$Nil ;; inputs
+ ctor-args ;; ctor-args
+ (&/$Tuple &/$Nil) ;; body
+ ])))
captured-slot-class "java.lang.Object"
captured-slot-type (&/$GenericClass captured-slot-class &/$Nil)]
(defn- analyse-jvm-anon-class [analyse compile-class exo-type super-class interfaces ctor-args methods]
@@ -902,7 +906,7 @@
(return (&/T [arg-type =arg-term])))))
ctor-args)
_ (->> methods
- (&/$Cons default-<init>)
+ (&/$Cons (default-<init> =ctor-args))
(&host/use-dummy-class class-decl super-class interfaces (&/$Some =ctor-args) &/$Nil))
[=methods =captured] (let [all-supers (&/$Cons super-class interfaces)]
(analyse-methods analyse class-type-decl all-supers methods))