diff options
Diffstat (limited to 'stdlib/source/library/lux/ffi.jvm.lux')
-rw-r--r-- | stdlib/source/library/lux/ffi.jvm.lux | 93 |
1 files changed, 46 insertions, 47 deletions
diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index f87ee7be3..1f40f0d76 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -389,7 +389,7 @@ (` {.#Primitive (, (code.text (..reflection (jvm.array elementT)))) {.#End}}) {.#None} - (` ((,! array.Array) (, (value_type elementT)))))])) + (` (array.Array (, (value_type elementT)))))])) ... else (undefined) ))) @@ -1018,7 +1018,7 @@ (, (return$ #method_output)) [(,* (list#each class$ #method_exs))])))) -(def with_super +(def .public with_super (syntax (_ [declaration,method (<code>.tuple (all <>.and (<text>.then parser.declaration' <code>.text) @@ -1095,7 +1095,7 @@ type value^^] (in [[name pm anns] {#VariableField [sm static? type]}]))))) -(def with_get|set +(def .public with_get|set (syntax (_ [declaration,fields (<code>.tuple (all <>.and <code>.text @@ -1190,7 +1190,7 @@ (context.def [call_context call_expression call_declaration] Call) -(def with_call +(def .public with_call (syntax (_ [declaration,methods (<code>.tuple (all <>.and (<text>.then parser.declaration' <code>.text) @@ -1252,8 +1252,8 @@ (list) virtual_methods - (list (` ((,! ..with_call) [(, (declaration$ (jvm.declaration fully_qualified_class_name class_vars))) - [(,* (list#each method_decl$$ virtual_methods))]]))))] + (list (` (..with_call [(, (declaration$ (jvm.declaration fully_qualified_class_name class_vars))) + [(,* (list#each method_decl$$ virtual_methods))]]))))] (case method_def {#ConstructorMethod strict_fp? type_vars self_name arguments constructor_args body exs} (meta#in (` ("init" @@ -1265,8 +1265,8 @@ (, (code.text self_name)) [(,* (list#each argument$ arguments))] [(,* (list#each constructor_arg$ constructor_args))] - (<| ((,! ..with_get|set) [(, (code.text fully_qualified_class_name)) - [(,* (list#each field_decl$ fields))]]) + (<| (..with_get|set [(, (code.text fully_qualified_class_name)) + [(,* (list#each field_decl$ fields))]]) (,* virtual_methods) (, body)) ))) @@ -1283,8 +1283,8 @@ [(,* (list#each argument$ arguments))] (, (return$ return_type)) [(,* (list#each class$ exs))] - (<| ((,! ..with_get|set) [(, (code.text fully_qualified_class_name)) - [(,* (list#each field_decl$ fields))]]) + (<| (..with_get|set [(, (code.text fully_qualified_class_name)) + [(,* (list#each field_decl$ fields))]]) (,* virtual_methods) (, body)) ))) @@ -1302,14 +1302,14 @@ [(,* (list#each argument$ expected_arguments))] (, (return$ return_type)) [(,* (list#each class$ exs))] - (<| ((,! ..with_super) [(, (declaration$ declaration)) - (, (method_decl$$ [method_declaration - [#method_tvars type_vars - #method_inputs (list#each product.right expected_arguments) - #method_output return_type - #method_exs exs]]))]) - ((,! ..with_get|set) [(, (code.text fully_qualified_class_name)) - [(,* (list#each field_decl$ fields))]]) + (<| (..with_super [(, (declaration$ declaration)) + (, (method_decl$$ [method_declaration + [#method_tvars type_vars + #method_inputs (list#each product.right expected_arguments) + #method_output return_type + #method_exs exs]]))]) + (..with_get|set [(, (code.text fully_qualified_class_name)) + [(,* (list#each field_decl$ fields))]]) (,* virtual_methods) (, body)) )))) @@ -1558,7 +1558,7 @@ return_term))] [with_return_try #import_member_try? (` (.try (, return_term)))] - [with_return_io #import_member_io? (` ((,! io.io) (, return_term)))] + [with_return_io #import_member_io? (` (io.io (, return_term)))] ) (with_template [<input?> <name> <unbox/box> <special+>] @@ -1630,7 +1630,7 @@ (list#each (function (_ [class [maybe? input]]) (|> (if maybe? (` (.is (.Primitive (, (code.text (..reflection class)))) - ((,! !!!) (, (..un_quoted input))))) + (!!! (, (..un_quoted input))))) (..un_quoted input)) [class] (with_automatic_input_conversion mode)))))) @@ -1644,7 +1644,7 @@ (def syntax_inputs (-> (List Code) (List Code)) (|>> (list#each (function (_ name) - (list name (` (,! <code>.any))))) + (list name (` <code>.any)))) list#conjoint)) (exception .public (cannot_write_to_field [class Text @@ -1694,8 +1694,8 @@ (with_return_try member) (with_return_io member))]] (in (list (` (def (, def_name) - ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs)))]) - ((,' in) (.list (.` (, jvm_interop)))))))))) + (syntax ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs)))]) + ((,' in) (.list (.` (, jvm_interop)))))))))) {#MethodDecl [commons method]} (with_symbols [g!obj] @@ -1749,9 +1749,9 @@ (with_return_try member) (with_return_io member))))]] (in (list (` (def (, def_name) - ((,! syntax) ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs))) - (,* (syntax_inputs object_ast))]) - ((,' in) (.list (.` (, jvm_interop))))))))))) + (syntax ((, def_name) [(,* (syntax_inputs (list#each product.right arg_function_inputs))) + (,* (syntax_inputs object_ast))]) + ((,' in) (.list (.` (, jvm_interop))))))))))) {#FieldAccessDecl fad} (do meta.monad @@ -1764,16 +1764,16 @@ (get_static_field full_name _#import_field_name) (get_virtual_field full_name _#import_field_name (..un_quoted g!obj)))]) getter_body (if _#import_field_maybe? - (` ((,! ???) (, getter_body))) + (` (??? (, getter_body))) getter_body) getter_body (if _#import_field_setter? - (` ((,! io.io) (, getter_body))) + (` (io.io (, getter_body))) getter_body) setter_value (|> [_#import_field_type (..un_quoted g!value)] (with_automatic_input_conversion _#import_field_mode)) setter_value (if _#import_field_maybe? - (` ((,! !!!) (, setter_value))) + (` (!!! (, setter_value))) setter_value) setter_command (if _#import_field_static? "jvm member put static" "jvm member put virtual") g!obj+ (.is (List Code) @@ -1782,33 +1782,32 @@ (list (..un_quoted g!obj)))) parser (let [write (if _#import_field_static? - (` (,! <code>.any)) - (` ((,! <>.and) - (,! <code>.any) - (,! <code>.any)))) + (` <code>.any) + (` (<>.and <code>.any + <code>.any))) read (if _#import_field_static? - (` (,! <code>.end)) - (` (,! <code>.any)))] - (` ((,! <>.or) (, write) (, read)))) + (` <code>.end) + (` <code>.any))] + (` (<>.or (, write) (, read)))) write (list (if _#import_field_static? (` {.#Left [(, g!value)]}) (` {.#Left [(, g!value) (, g!obj)]})) (if _#import_field_setter? - (` ((,' in) (.list (.` ((,! io.io) ((, (code.text setter_command)) - (, (code.text full_name)) - (, (code.text _#import_field_name)) - (, setter_value) - (,* g!obj+))))))) - (` ((,! meta.failure) (, (code.text (exception.error ..cannot_write_to_field [full_name _#import_field_name]))))))) + (` ((,' in) (.list (.` (io.io ((, (code.text setter_command)) + (, (code.text full_name)) + (, (code.text _#import_field_name)) + (, setter_value) + (,* g!obj+))))))) + (` (meta.failure (, (code.text (exception.error ..cannot_write_to_field [full_name _#import_field_name]))))))) read (list (if _#import_field_static? (` {.#Right []}) (` {.#Right [(, g!obj)]})) (` ((,' in) (.list (.` (, getter_body))))))] (list (` (def (, g!name) - ((,! syntax) ((, g!name) [(, write|read) (, parser)]) - (case (, write|read) - (,* write) - (,* read)))))))))) + (syntax ((, g!name) [(, write|read) (, parser)]) + (case (, write|read) + (,* write) + (,* read)))))))))) ))) (def (member_import$ vars kind class [import_format member]) @@ -1878,7 +1877,7 @@ [jvm.double "jvm array new double"] [jvm.char "jvm array new char"])) ... else - (in (list (` (.as ((,! array.Array) (, (value_type {#ManualPrM} type))) + (in (list (` (.as (array.Array (, (value_type {#ManualPrM} type))) (.is (, (value_type {#ManualPrM} (jvm.array type))) ("jvm array new object" (, g!size)))))))))))) |