0x7CFE / llst

LLVM powered Little Smalltalk.
Other
93 stars 10 forks source link

Type based alias analysis for Smalltalk #56

Open 0x7CFE opened 10 years ago

0x7CFE commented 10 years ago

Smalltalk being a fully dynamic language is still very structured in terms of memory organization. All objects share the same format and operate in a very simple and straightforward way. This is very convinient from compiler's point of view because we do not need to handle a wide variety of side effects and make potentially dangerous assumptions.

One of this is pointer aliasing. Smalltalk objects never overlap. Pointers to objects always point to the header and do not overlap too (restricted pointer access in terms of C). The only situation when pointers may overlap is the BulkReplace primitive operation which is performed on the same object. Non-object pointers are instances of SmallInt and need to be handled separately.

Knowing these facts we may implement very optimistic alias analyzer that will help LLVM to solve pointer aliasing issues. Future progress in static type inference will boost it even further.

See also: http://llvm.org/docs/AliasAnalysis.html

0x7CFE commented 8 years ago

Static analysis implemented in #92 will provide a basis for TBAA.