diff options
author | Eduardo Julian | 2018-08-29 22:36:47 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-08-29 22:36:47 -0400 |
commit | ba93f7da278a3fdc71729d7a0325c99cec74ca3c (patch) | |
tree | 84f298edb360fefb6c6b518394a4565546ef0739 /new-luxc/source/luxc/lang/translation/jvm.lux | |
parent | c9ff55f6c989aff28b2d687fd8aa0ef520701e2c (diff) |
Adapted new-luxc to latest stdlib changes.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm.lux | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm.lux b/new-luxc/source/luxc/lang/translation/jvm.lux index b8c00c8a4..560994256 100644 --- a/new-luxc/source/luxc/lang/translation/jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm.lux @@ -57,16 +57,16 @@ (def: ClassLoader::defineClass Method - (case (Class::getDeclaredMethod ["defineClass" - (|> (host.array (Class Object) 4) - (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 (:coerce (Class Object) Integer::TYPE)) - (host.array-write 3 (:coerce (Class Object) Integer::TYPE)))] + (case (Class::getDeclaredMethod "defineClass" + (|> (host.array (Class Object) 4) + (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 (:coerce (Class Object) (Integer::TYPE))) + (host.array-write 3 (:coerce (Class Object) (Integer::TYPE)))) (host.class-for java/lang/ClassLoader)) (#error.Success method) (do-to method - (AccessibleObject::setAccessible [#1])) + (AccessibleObject::setAccessible #1)) (#error.Error error) (error! error))) @@ -75,11 +75,11 @@ (def: (define-class class-name bytecode loader) (-> Text ByteCode ClassLoader (Error Object)) - (Method::invoke [loader - (array.from-list (list (:coerce Object class-name) - (:coerce Object bytecode) - (:coerce Object (host.long-to-int +0)) - (:coerce Object (host.long-to-int (.int (host.array-length bytecode))))))] + (Method::invoke loader + (array.from-list (list (:coerce Object class-name) + (:coerce Object bytecode) + (:coerce Object (host.long-to-int +0)) + (:coerce Object (host.long-to-int (.int (host.array-length bytecode)))))) ClassLoader::defineClass)) (type: Store (Atom (Dictionary Text ByteCode))) @@ -124,7 +124,7 @@ (def: (load! name loader) (-> Text ClassLoader (Error (Class Object))) - (ClassLoader::loadClass [name] loader)) + (ClassLoader::loadClass name loader)) (def: #export value-field Text "_value") (def: #export $Object jvm.Type (type.class "java.lang.Object" (list))) @@ -143,9 +143,9 @@ (def: (class-value class-name class) (-> Text (Class Object) (Error Any)) - (case (Class::getField [..value-field] class) + (case (Class::getField ..value-field class) (#error.Success field) - (case (Field::get [#.None] field) + (case (Field::get #.None field) (#error.Success ?value) (case ?value (#.Some value) |