Skip to content

Instantly share code, notes, and snippets.

@xushijie
Created December 29, 2013 21:22
Show Gist options
  • Save xushijie/8174975 to your computer and use it in GitHub Desktop.
Save xushijie/8174975 to your computer and use it in GitHub Desktop.
Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches (Stanford) Published in ECOOP ‘91 proceedings, Springer Verlag Lecture Notes in Computer Science 512, July, 1991
This is basic background literature for dynamic language and polymorphic inline cache.
The basic idea:
1, collect type information by recording all of the receiver types actually used at a given call site.
2, The compiler can exploit this type information to generate better code when recompiling a method.
@xushijie
Copy link
Author

Type prediction, analysis and split may work in some scenarios.

Nevertheless, there are classes of variables and expressions that type analysis cannot analyze well. One such class is the types of arguments to the method (our SELFsystem customizes on the type of the receiver, but not on the type of arguments).

Another important class is the types of instance variables and array elements (actually, any assignable heap cell).
These weaknesses of type analysis can be quite damaging to the overall performance of the system, espe-
cially for typical object-oriented programs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment