Skip to content

Commit dbb1a07

Browse files
committed
Op for getting hold of the attribute lookup hint.
1 parent b9cf1cb commit dbb1a07

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/ops/nqp.ops

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,23 @@ inline op repr_get_primitive_type_spec(out INT, in PMC) :base_core {
13301330

13311331
/*
13321332

1333+
=item repr_hint_for
1334+
1335+
Gets lookup hint for an attribute.
1336+
1337+
=cut
1338+
1339+
*/
1340+
inline op repr_hint_for(out INT, in PMC, in PMC, in STR) :base_core {
1341+
PMC *ch = decontainerize(interp, $3);
1342+
if ($2->vtable->base_type == smo_id)
1343+
$1 = REPR($2)->hint_for(interp, $2, $3, $4);
1344+
else
1345+
$1 = NO_HINT;
1346+
}
1347+
1348+
/*
1349+
13331350
=item is_container
13341351

13351352
Checks if the type of thing in $2 is a container or not. Puts a non-zero

0 commit comments

Comments
 (0)