Applied in changeset trunk|r64640. ---------- range.c: Range#cover? accepts Range object. [Feature #14473] * range.c (range_cover): add code for range argument. If the argument is a Range, check it is or is not covered b...tarui (Masaya Tarui)
Thank you for your patch owst. I reviewed it and feel the behavior below is strange. ~~~ $ ruby -e 'p (1..3.1).cover?(1...3)' true $ ruby -e 'p (1..3.1).cover?(1...4)' Traceback (most recent call last): 1: from -e:1:i...tarui (Masaya Tarui)
As real-world use-case, I want it(include,cover version) for guarding NArray's Index arguments. NArray#[] can accept Integer and Range. Currently, to limit the access range, We have to write complex code. ~~~ ruby def check(idx,ra...tarui (Masaya Tarui)
Applied in changeset r54976. ---------- * compile.c (iseq_compile_each): share InlineCache during same instance variable accesses. Reducing memory consumption, rasing cache hit rate and rasing branch prediction hit rate are exp...tarui (Masaya Tarui)
> About the object check, is it not problematic to do ((struct RBasic*)obj)->klass if obj is a tagged integer (since klass is the second member, after flags)? Thank you for pointing out. I'll revive check. tarui (Masaya Tarui)
2016-04-13 5:41 GMT+09:00 <eregontp@gmail.com>: > Issue #12274 has been updated by Benoit Daloze. > ... It is not for avoiding ID2SYM (In fact, it is calculated every time :-), it is for sharing. Please check the 0007 below ``` ...tarui (Masaya Tarui)
there are 2 parts of optimization. * share inline cache between same symbol(at compile.c) * inline fast pass only and cut useless check(RB_TYPE_P).(at insns.def) We can skip st_lookup from the 2nd insns by sharing cache. I...tarui (Masaya Tarui)