diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2021-05-18 17:54:34 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:35 -0400 |
commit | 1aace65dc045909b6c33491fe3f5218c33117e0a (patch) | |
tree | 831e242cc9b34c7446f68d2bc380e6558100c4f7 | |
parent | 03da234eb019902176f8d456fceaefee11858a59 (diff) | |
download | ruby-1aace65dc045909b6c33491fe3f5218c33117e0a.tar.gz |
Add comment
-rw-r--r-- | yjit_codegen.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c index 33efb927ec..f98283f338 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -1011,7 +1011,15 @@ gen_get_ivar(jitstate_t *jit, ctx_t *ctx, const int max_chain_depth, VALUE compt return YJIT_END_BLOCK; } - // FIXME: we should be able to eliminate this check with object shapes + // FIXME: + // This check was added because of a failure in a test involving the + // Nokogiri Document class where we see a T_DATA that still has the default + // allocator. + // Aaron Patterson argues that this is a bug in the C extension, because + // people could call .allocate() on the class and still get a T_OBJECT + // For now I added an extra dynamic check that the receiver is T_OBJECT + // so we can safely pass all the tests in Shopify Core. + // // Guard that the receiver is T_OBJECT // #define RB_BUILTIN_TYPE(x) (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) ADD_COMMENT(cb, "guard receiver is T_OBJECT"); |