From 51a5c28b0f9efd514e3fae7c2634fd5e9bd714e2 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 22 Jul 2021 01:16:40 -0400 Subject: New JVM compiler can now compile JVM classes. --- .../luxc/lang/translation/jvm/extension/host.lux | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux') diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux index 33552c135..e647bf71b 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux @@ -149,7 +149,7 @@ [_.I2L conversion::short_to_long] ) -(def: conversion +(def: conversion_bundle Bundle (<| (bundle.prefix "conversion") (|> (: Bundle bundle.empty) @@ -274,7 +274,7 @@ [double::< _.DCMPG -1] ) -(def: int +(def: int_bundle Bundle (<| (bundle.prefix (reflection.reflection reflection.int)) (|> (: Bundle bundle.empty) @@ -293,7 +293,7 @@ (bundle.install "ushr" (binary int::ushr)) ))) -(def: long +(def: long_bundle Bundle (<| (bundle.prefix (reflection.reflection reflection.long)) (|> (: Bundle bundle.empty) @@ -312,7 +312,7 @@ (bundle.install "ushr" (binary long::ushr)) ))) -(def: float +(def: float_bundle Bundle (<| (bundle.prefix (reflection.reflection reflection.float)) (|> (: Bundle bundle.empty) @@ -325,7 +325,7 @@ (bundle.install "<" (binary float::<)) ))) -(def: double +(def: double_bundle Bundle (<| (bundle.prefix (reflection.reflection reflection.double)) (|> (: Bundle bundle.empty) @@ -338,7 +338,7 @@ (bundle.install "<" (binary double::<)) ))) -(def: char +(def: char_bundle Bundle (<| (bundle.prefix (reflection.reflection reflection.char)) (|> (: Bundle bundle.empty) @@ -455,7 +455,7 @@ valueI _.AASTORE))))])) -(def: array +(def: array_bundle Bundle (<| (bundle.prefix "array") (|> bundle.empty @@ -773,7 +773,7 @@ (_.fuse (list@map product.right inputsTI)) (_.INVOKESPECIAL class "" (type.method [(list) (list@map product.left inputsTI) type.void (list)]))))))])) -(def: member +(def: member_bundle Bundle (<| (bundle.prefix "member") (|> (: Bundle bundle.empty) @@ -925,7 +925,8 @@ (#synthesis.Extension [name inputsS+]) (#synthesis.Extension [name (list@map recur inputsS+)])))) -(def: $Object (type.class "java.lang.Object" (list))) +(def: $Object + (type.class "java.lang.Object" (list))) (def: (anonymous_init_method env) (-> (Environment Synthesis) (Type Method)) @@ -960,7 +961,7 @@ (_.fuse captureI+) (_.INVOKESPECIAL class "" (anonymous_init_method env)))))) -(def: (returnI returnT) +(def: #export (returnI returnT) (-> (Type Return) Inst) (case (type.void? returnT) (#.Right returnT) @@ -1074,7 +1075,7 @@ _ (generation.save! artifact_id #.None directive)] (..anonymous_instance generate archive class total_environment)))])) -(def: bundle::class +(def: class_bundle Bundle (<| (bundle.prefix "class") (|> (: Bundle bundle.empty) @@ -1084,14 +1085,14 @@ (def: #export bundle Bundle (<| (bundle.prefix "jvm") - (|> ..conversion - (dictionary.merge ..int) - (dictionary.merge ..long) - (dictionary.merge ..float) - (dictionary.merge ..double) - (dictionary.merge ..char) - (dictionary.merge ..array) + (|> ..conversion_bundle + (dictionary.merge ..int_bundle) + (dictionary.merge ..long_bundle) + (dictionary.merge ..float_bundle) + (dictionary.merge ..double_bundle) + (dictionary.merge ..char_bundle) + (dictionary.merge ..array_bundle) (dictionary.merge ..object_bundle) - (dictionary.merge ..member) - (dictionary.merge ..bundle::class) + (dictionary.merge ..member_bundle) + (dictionary.merge ..class_bundle) ))) -- cgit v1.2.3