diff options
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux')
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux index 947bbc69f..358c666c7 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux @@ -60,14 +60,14 @@ [(def: #export <name> .Type (#.Primitive <class> #.Nil))] ## Boxes - [Boolean "java.lang.Boolean"] - [Byte "java.lang.Byte"] - [Short "java.lang.Short"] - [Integer "java.lang.Integer"] - [Long "java.lang.Long"] - [Float "java.lang.Float"] - [Double "java.lang.Double"] - [Character "java.lang.Character"] + [Boolean jvm.boolean-box] + [Byte jvm.byte-box] + [Short jvm.short-box] + [Integer jvm.int-box] + [Long jvm.long-box] + [Float jvm.float-box] + [Double jvm.double-box] + [Character jvm.char-box] [String "java.lang.String"] ## Primitives @@ -354,14 +354,14 @@ (def: #export boxes (Dictionary Text Text) - (|> (list [jvm.boolean-reflection "java.lang.Boolean"] - [jvm.byte-reflection "java.lang.Byte"] - [jvm.short-reflection "java.lang.Short"] - [jvm.int-reflection "java.lang.Integer"] - [jvm.long-reflection "java.lang.Long"] - [jvm.float-reflection "java.lang.Float"] - [jvm.double-reflection "java.lang.Double"] - [jvm.char-reflection "java.lang.Character"]) + (|> (list [jvm.boolean-reflection jvm.boolean-box] + [jvm.byte-reflection jvm.byte-box] + [jvm.short-reflection jvm.short-box] + [jvm.int-reflection jvm.int-box] + [jvm.long-reflection jvm.long-box] + [jvm.float-reflection jvm.float-box] + [jvm.double-reflection jvm.double-box] + [jvm.char-reflection jvm.char-box]) (dictionary.from-list text.hash))) (def: (array-type-info allow-primitives? arrayT) @@ -518,10 +518,10 @@ (check-jvm outputT) #.None - (/////analysis.throw non-object objectT)) + (/////analysis.throw ..non-object objectT)) _ - (/////analysis.throw non-object objectT))) + (/////analysis.throw ..non-object objectT))) (def: (check-object objectT) (-> .Type (Operation Text)) @@ -1032,17 +1032,18 @@ can-cast? (: (Operation Bit) (case [from-name to-name] (^template [<primitive> <object>] - (^or (^ [(static <primitive>) <object>]) - (^ [<object> (static <primitive>)])) + (^or (^ [(static <primitive>) (static <object>)]) + (^ [(static <object>) (static <primitive>)]) + (^ [(static <primitive>) (static <primitive>)])) (wrap #1)) - ([jvm.boolean-reflection "java.lang.Boolean"] - [jvm.byte-reflection "java.lang.Byte"] - [jvm.short-reflection "java.lang.Short"] - [jvm.int-reflection "java.lang.Integer"] - [jvm.long-reflection "java.lang.Long"] - [jvm.float-reflection "java.lang.Float"] - [jvm.double-reflection "java.lang.Double"] - [jvm.char-reflection "java.lang.Character"]) + ([jvm.boolean-reflection jvm.boolean-box] + [jvm.byte-reflection jvm.byte-box] + [jvm.short-reflection jvm.short-box] + [jvm.int-reflection jvm.int-box] + [jvm.long-reflection jvm.long-box] + [jvm.float-reflection jvm.float-box] + [jvm.double-reflection jvm.double-box] + [jvm.char-reflection jvm.char-box]) _ (do @ @@ -1188,7 +1189,7 @@ (dictionary.from-list text.hash)))) _ - (/////analysis.throw non-object objectT))) + (/////analysis.throw ..non-object objectT))) fieldT (java-type-to-lux-type mapping fieldJT)] (wrap [fieldT (Modifier::isFinal modifiers)])) (/////analysis.throw not-a-virtual-field [class-name field-name])))) |