From d3f5e1f4baa667bc2eb72edd542cf5d8cd3924ce Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 3 Jul 2018 18:40:16 -0400 Subject: - Re-named ":!" to ":coerce". --- new-luxc/source/luxc/lang/host.jvm.lux | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'new-luxc/source/luxc/lang/host.jvm.lux') 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") -- cgit v1.2.3