1
# Note: this file probably wants to be in some Perl6::CompilerGuts namespace.
5
method ACCEPTS(Mu $topic) {
9
$!checker.ACCEPTS($topic)
13
our sub CREATE_SUBSET_TYPE(Mu \$original, $checker) {
14
# XXX Ideally we'd be able to just replace all of what follows
16
# my $subtype = $original but SubType($checker);
17
# However, that won't quite work until we improve type object
20
$P0 = find_lex '$original'
22
$P2 = get_hll_global 'SubType'
27
addattribute $P3, '$!checker'
28
$P4 = getprop 'metaclass', $P1
29
setprop $P3, 'metaclass', $P4
31
transform_to_p6opaque %r
32
$P5 = find_lex '$checker'
33
setattribute %r, '$!checker', $P5
34
$P6 = getprop 'subtype_realtype', $P0
35
if null $P6 goto original_unrefined
36
setprop %r, 'subtype_realtype', $P6
39
setprop %r, 'subtype_realtype', $P0