Skip to content

Commit 749768c

Browse files
committed
Fix nqp::isinvokable to know invocation spec.
1 parent a746f77 commit 749768c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/QRegex/Cursor.nqp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ class NQPCursor does NQPCursorRole {
741741
}
742742

743743
class NQPRegexMethod {
744-
has $!code is parrot_vtable_handler('invoke');
744+
has $!code;
745745
method new($code) {
746746
self.bless(:code($code));
747747
}

src/ops/nqp.ops

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,8 @@ inline op is_invokable(out INT, in PMC) :base_core {
20742074
PMC **vt = STABLE($2)->parrot_vtable_mapping;
20752075
AttributeIdentifier *vth = STABLE($2)->parrot_vtable_handler_mapping;
20762076
$1 = (vt && !PMC_IS_NULL(vt[PARROT_VTABLE_SLOT_INVOKE])) ||
2077-
(vth && !PMC_IS_NULL(vth[PARROT_VTABLE_SLOT_INVOKE].class_handle));
2077+
(vth && !PMC_IS_NULL(vth[PARROT_VTABLE_SLOT_INVOKE].class_handle)) ||
2078+
STABLE($2)->invocation_spec;
20782079
}
20792080
else {
20802081
$1 = VTABLE_does(interp, $2, Parrot_str_new(interp, "invokable", 0));

0 commit comments

Comments
 (0)