A VM-agnostic and backwards compatible protected modifier for dynamically-typed languagesVol. 8
In object-oriented languages, method visibility modifiers hold a key role in separating internal methods from the public API. Protected visibility modifiers offer a way to hide methods from external objects while authorizing internal use and overriding in subclasses. While present in main statically-typed languages, visibility modifiers are not as common or mature in dynamically-typed languages. In this article, we present PROTDYN, a self-send-based visibility model calculated at compile time for dynamically-typed languages relying on name-mangling and syntactic differentiation of self vs non self sends. We present #PHARO, a PROTDYN implementation of this model that is backwards compatible with existing programs, and its port to Python. Using these implementations we study the performance impact of PROTDYN on the method lookup, in the presence of global lookup caches and polymorphic inline caches. We show that our name mangling and double method registration technique has a very low impact on performance and keeps the benefits from the global lookup cache and polymorphic inline cache. We also show that the memory overhead on a real use case is between 2% and 13% in the worst-case scenario. Protected modifier semantics enforces encapsulation such as private but allow developers to still extend the class in subclasses. PROTDYN offers a VM-agnostic and backwards-compatible design to introduce protected semantics in dynamically-typed languages.
Thu 14 MarDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
10:30 - 12:00 | Research Papers 4Research Papers at M:Teknodromen Chair(s): Guido Salvaneschi University of St. Gallen | ||
10:30 30mTalk | Broadening the View of Live Programmers: Integrating a Cross-cutting Perspective on Run-time Behavior Into a Live Programming EnvironmentVol. 8 Research Papers Patrick Rein University of Potsdam; Hasso Plattner Institute, Christian Flach Hasso Plattner Institute, University of Potsdam, Germany, Stefan Ramson Hasso Plattner Institute, Germany, Eva Krebs Hasso Plattner Institute (HPI), University of Potsdam, Germany, Robert Hirschfeld University of Potsdam; Hasso Plattner Institute Link to publication DOI | ||
11:00 30mTalk | A VM-agnostic and backwards compatible protected modifier for dynamically-typed languagesVol. 8 Research Papers Iona Thomas Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189 - CRIStAL, Vincent Aranega Univ. Lille, CNRS, Inria, Centrale Lille, UMR 9189 - CRIStAL, Stéphane Ducasse Inria; University of Lille; CNRS; Centrale Lille; CRIStAL, Guillermo Polito Inria, Cristal, UMR 9189, Université de Lille, Pablo Tesone Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189 CRIStAL, Pharo Consortium Link to publication DOI | ||
11:30 30mTalk | Live Objects All The Way Down: Removing the Barriers between Applications and Virtual MachinesVol. 8 Research Papers Javier Pimás Universidad de Buenos Aires, Stefan Marr University of Kent, Diego Garbervetsky University of Buenos Aires and CONICET, Argentina Link to publication DOI |