diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/host.jvm.lux | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/new-luxc/source/luxc/lang/host.jvm.lux b/new-luxc/source/luxc/lang/host.jvm.lux index 9a959bb48..0491cae25 100644 --- a/new-luxc/source/luxc/lang/host.jvm.lux +++ b/new-luxc/source/luxc/lang/host.jvm.lux @@ -40,10 +40,10 @@ Method (case (Class::getDeclaredMethod ["defineClass" (|> (host.array (Class Object) +4) - (host.array-write +0 (:! (Class Object) (host.class-for String))) + (host.array-write +0 (:coerce (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.array-write +2 (:coerce (Class Object) Integer::TYPE)) + (host.array-write +3 (:coerce (Class Object) Integer::TYPE)))] (host.class-for java/lang/ClassLoader)) (#e.Success method) (do-to method @@ -55,10 +55,10 @@ (def: (define-class class-name byte-code loader) (-> Text commonT.Bytecode ClassLoader (e.Error Object)) (Method::invoke [loader - (array.from-list (list (:! Object class-name) - (:! Object byte-code) - (:! Object (host.long-to-int 0)) - (:! Object (host.long-to-int (.int (host.array-length byte-code))))))] + (array.from-list (list (:coerce Object class-name) + (:coerce Object byte-code) + (:coerce Object (host.long-to-int 0)) + (:coerce Object (host.long-to-int (.int (host.array-length byte-code))))))] ClassLoader::defineClass)) (def: (fetch-byte-code class-name store) @@ -72,7 +72,7 @@ (ClassLoader (findClass [class-name String]) Class (case (fetch-byte-code class-name store) (#.Some bytecode) - (case (define-class class-name bytecode (:! ClassLoader _jvm_this)) + (case (define-class class-name bytecode (:coerce ClassLoader _jvm_this)) (#e.Success class) (:assume class) @@ -96,15 +96,15 @@ (def: #export (with-anchor anchor expr) (All [a] (-> [Label Register] (Meta a) (Meta a))) (.function (_ compiler) - (let [old (:! commonT.Host (get@ #.host compiler))] + (let [old (:coerce commonT.Host (get@ #.host compiler))] (case (expr (set@ #.host - (:! Nothing (set@ #commonT.anchor (#.Some anchor) old)) + (:coerce Nothing (set@ #commonT.anchor (#.Some anchor) old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host - (|>> (:! commonT.Host) + (|>> (:coerce commonT.Host) (set@ #commonT.anchor (get@ #commonT.anchor old)) - (:! Nothing)) + (:coerce Nothing)) compiler') output]) @@ -117,7 +117,7 @@ (def: #export anchor (Meta [Label Register]) (.function (_ compiler) - (case (|> compiler (get@ #.host) (:! commonT.Host) (get@ #commonT.anchor)) + (case (|> compiler (get@ #.host) (:coerce commonT.Host) (get@ #commonT.anchor)) (#.Some anchor) (#e.Success [compiler anchor]) @@ -128,15 +128,15 @@ (def: #export (with-context name expr) (All [a] (-> Text (Meta a) (Meta a))) (.function (_ compiler) - (let [old (:! commonT.Host (get@ #.host compiler))] + (let [old (:coerce commonT.Host (get@ #.host compiler))] (case (expr (set@ #.host - (:! Nothing (set@ #commonT.context [(lang.normalize-name name) +0] old)) + (:coerce Nothing (set@ #commonT.context [(lang.normalize-name name) +0] old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host - (|>> (:! commonT.Host) + (|>> (:coerce commonT.Host) (set@ #commonT.context (get@ #commonT.context old)) - (:! Nothing)) + (:coerce Nothing)) compiler') output]) @@ -146,17 +146,17 @@ (def: #export (with-sub-context expr) (All [a] (-> (Meta a) (Meta [Text a]))) (.function (_ compiler) - (let [old (:! commonT.Host (get@ #.host compiler)) + (let [old (:coerce commonT.Host (get@ #.host compiler)) [old-name old-sub] (get@ #commonT.context old) new-name (format old-name "$" (%i (.int old-sub)))] (case (expr (set@ #.host - (:! Nothing (set@ #commonT.context [new-name +0] old)) + (:coerce Nothing (set@ #commonT.context [new-name +0] old)) compiler)) (#e.Success [compiler' output]) (#e.Success [(update@ #.host - (|>> (:! commonT.Host) + (|>> (:coerce commonT.Host) (set@ #commonT.context [old-name (inc old-sub)]) - (:! Nothing)) + (:coerce Nothing)) compiler') [new-name output]]) @@ -168,7 +168,7 @@ (.function (_ compiler) (#e.Success [compiler (|> (get@ #.host compiler) - (:! commonT.Host) + (:coerce commonT.Host) (get@ #commonT.context) (let> [name sub] name))]))) @@ -179,7 +179,7 @@ (#e.Success [compiler (|> compiler (get@ #.host) - (:! commonT.Host) + (:coerce commonT.Host) (get@ #commonT.loader))]))) (def: #export runtime-class Text "LuxRuntime") |