From 97e6a43653d7a8a2a1e201d753bba4b6bf3872ba Mon Sep 17 00:00:00 2001 From: Vadim Belman Date: Mon, 27 Nov 2023 21:20:26 -0500 Subject: [PATCH] Fix JVM backend compatibility --- src/Perl6/Metamodel/GenericHOW.nqp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Perl6/Metamodel/GenericHOW.nqp b/src/Perl6/Metamodel/GenericHOW.nqp index c5f6938aad..6fb7e8d76a 100644 --- a/src/Perl6/Metamodel/GenericHOW.nqp +++ b/src/Perl6/Metamodel/GenericHOW.nqp @@ -28,11 +28,16 @@ class Perl6::Metamodel::GenericHOW method instantiate_generic($obj, $type_environment) { my $found := nqp::null(); my $name := self.name($obj); - my $repr := nqp::reprname($type_environment); - if $repr eq 'MVMContext' { + my $te-kind := $type_environment.HOW.name($type_environment); +#?if !jvm + if $te-kind eq 'BOOTContext' { +#?endif +#?if jvm + if $te-kind eq 'ContextRef' { +#?endif $found := nqp::getlexrel($type_environment, $name); } - elsif $repr eq 'VMHash' { + elsif $te-kind eq 'BOOTHash' { $found := nqp::atkey($type_environment, $name); } elsif nqp::isconcrete($type_environment) && $type_environment.EXISTS-KEY($name) {