Permalink
Browse files

Fix nqp::isinvokable to know invocation spec.

  • Loading branch information...
1 parent a746f77 commit 749768c9be586bb63d8f2c31f32f6102a871796c @jnthn jnthn committed Feb 13, 2013
Showing with 3 additions and 2 deletions.
  1. +1 −1 src/QRegex/Cursor.nqp
  2. +2 −1 src/ops/nqp.ops
View
2 src/QRegex/Cursor.nqp
@@ -741,7 +741,7 @@ class NQPCursor does NQPCursorRole {
}
class NQPRegexMethod {
- has $!code is parrot_vtable_handler('invoke');
+ has $!code;
method new($code) {
self.bless(:code($code));
}
View
3 src/ops/nqp.ops
@@ -2074,7 +2074,8 @@ inline op is_invokable(out INT, in PMC) :base_core {
PMC **vt = STABLE($2)->parrot_vtable_mapping;
AttributeIdentifier *vth = STABLE($2)->parrot_vtable_handler_mapping;
$1 = (vt && !PMC_IS_NULL(vt[PARROT_VTABLE_SLOT_INVOKE])) ||
- (vth && !PMC_IS_NULL(vth[PARROT_VTABLE_SLOT_INVOKE].class_handle));
+ (vth && !PMC_IS_NULL(vth[PARROT_VTABLE_SLOT_INVOKE].class_handle)) ||
+ STABLE($2)->invocation_spec;
}
else {
$1 = VTABLE_does(interp, $2, Parrot_str_new(interp, "invokable", 0));

0 comments on commit 749768c

Please sign in to comment.