Journal of Information Processing
Online ISSN : 1882-6652
ISSN-L : 1882-6652
Call-trail Dependent Inline Caching for a Scoping Mechanism of Class Extensions
Wei ZhangShigeru Chiba
著者情報
キーワード: class extensions, inline caching, Ruby
ジャーナル フリー

2018 年 26 巻 p. 327-334

詳細
抄録

We propose call-trail dependent inline caching to improve the method dispatch performance of Method Seals. Method Seals is a class extension mechanism that allows users to manually control the effective range of class extensions. It provides better safety than existing class extension mechanisms. However, the absence of inline method cache renders Method Seals' runtime performance unsatisfactory. To enable inline caching on Method Seals, we added call-trail dependency to the conventional inline caching mechanism. To that end, we introduced the notion of call-trails which represent sets of classes along a call path. We use fixed-length bitsets for representing the current call-trail and a method definition's unsealed package list. Also, we relaxed Method Seals' semantic constraints accordingly in order to implement our proposal. We also implemented the proposed call-trail dependent inline caching on top of Method Seals and benchmarked its performance.

著者関連情報
© 2018 by the Information Processing Society of Japan
前の記事 次の記事
feedback
Top