ruby-changes:68989
From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:19:36 +0900 (JST)
Subject: [ruby-changes:68989] 1aace65dc0 (master): Add comment
https://git.ruby-lang.org/ruby.git/commit/?id=1aace65dc0 From 1aace65dc045909b6c33491fe3f5218c33117e0a Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...> Date: Tue, 18 May 2021 17:54:34 -0400 Subject: Add comment --- yjit_codegen.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 https://github.com/ruby/ruby/blob/trunk/yjit_codegen.c#L1011 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"); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/