Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created February 2, 2011 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/808572 to your computer and use it in GitHub Desktop.
Save jnthn/808572 to your computer and use it in GitHub Desktop.
* In the s-table, only REPR is REPR-dependent. :)
* All the s-table caches are optional. A meta-object publishes those
it can sanely use. Lack of doing so just implies - in the case you
asked about - a fallback call to .^typecheck. So the type check
cache simply isn't applicable to subset types - or at least the
routiney bit. At some point it'll check against a non-subset type
and that can take advantage of it though.
* If you find a system with non 8-bit bytes that the rest of Perl 6
could otherwise run on, let me know. ;-)
* The missing string mark is a bug, thanks. Though in nqp-rx we
never use that REPR directly, but it always is inlined into a
P6opaque, which does handle the marking...but it would be a problem
if the repr was used directly, which would be possible.
* native type declarator just implies using NativeHoW. That in itself
does little; it demenads you specify a repr explicitly though. In
the future it may sanity-check that it'll probably sanity check that
it's an inlineable one. It also doesn't allow methods and attrs and
the like. Perhaps the "what does this box to" should live on this
meta-object too. I'm still undecided on that area.
* At the moment the compiler must call the correct get_attribute
[_int|_num|_str]? variant and emit its own boxing. So that those
implementing REPRs don't have to repeat that. Note that I didn't add
safety checks into those REPR functions yet in P6opaque...partly
because I'm not 100% decided on this area and want to play with the
compilation of things like you asked about before I decide.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment