From 50cc5fbe7cc8abde05085944393fcec4c791402f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 5 Sep 2017 18:36:09 -0400 Subject: - Updated new compiler's code to the recent changes in the language. - WIP: Some other changes/additions to the new compiler. --- new-luxc/source/luxc/host.jvm.lux | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'new-luxc/source/luxc/host.jvm.lux') diff --git a/new-luxc/source/luxc/host.jvm.lux b/new-luxc/source/luxc/host.jvm.lux index d5b4e89b0..00957f3d4 100644 --- a/new-luxc/source/luxc/host.jvm.lux +++ b/new-luxc/source/luxc/host.jvm.lux @@ -1,6 +1,6 @@ (;module: lux - (lux (control monad) + (lux (control [monad #+ do]) (concurrency ["A" atom]) (data ["R" result] [text] @@ -8,7 +8,7 @@ (coll ["d" dict] [array #+ Array])) [macro #+ Monad] - host + [host #+ jvm-import do-to object] [io]) (luxc ["&" base] (generator ["&&;" common]) @@ -34,12 +34,12 @@ (def: ClassLoader::defineClass Method (case (Class.getDeclaredMethod ["defineClass" - (|> (array (Class Object) +4) - (array-store +0 (:! (Class Object) (class-for String))) - (array-store +1 (Object.getClass [] (array byte +0))) - (array-store +2 (:! (Class Object) Integer.TYPE)) - (array-store +3 (:! (Class Object) Integer.TYPE)))] - (class-for java.lang.ClassLoader)) + (|> (host;array (Class Object) +4) + (host;array-write +0 (:! (Class Object) (host;class-for String))) + (host;array-write +1 (Object.getClass [] (host;array byte +0))) + (host;array-write +2 (:! (Class Object) Integer.TYPE)) + (host;array-write +3 (:! (Class Object) Integer.TYPE)))] + (host;class-for java.lang.ClassLoader)) (#R;Success method) (do-to method (AccessibleObject.setAccessible [true])) @@ -52,8 +52,8 @@ (Method.invoke [loader (array;from-list (list (:! Object class-name) (:! Object byte-code) - (:! Object (l2i 0)) - (:! Object (l2i (nat-to-int (array-length byte-code))))))] + (:! Object (host;l2i 0)) + (:! Object (host;l2i (nat-to-int (host;array-length byte-code))))))] ClassLoader::defineClass)) (def: (fetch-byte-code class-name store) -- cgit v1.2.3