LSWVST Smalltalk-Compiler

The Smalltalk-Compiler of LSWVST allows to compile a superset of the Smalltalk Language. in contrast to other approaches we didn't change the Syntax.

Method permanent Variables:

| FirstTime |

FirstTime ifNil: [ "Method is invoked first time". FirstTime := false ].

FirstTime iffFalse: [ ]

Method permanent Variables per Process / OSThread:

Process Classes ( Process / OSThread / OSFiber ) can be subclassed and new instance-variables can be added.

Generic Inlining

In contrast to static Inlining generic inlining can be extended and customized.

ClassShadow and MetaClassShadow

Shadows are optimized Versions of classes. Shadows can represented their original Class by collapsing all of their methods up to a certain superclass. This minimizes MethodDictionary Lookups and speeds up certain Smalltalk programs enormously.

There can be arbritrary many shadows per Class which can be retrieved by accessing the GlobalShadows SystemDictionary

CompilerFacade>>compilerClass

^ ( GlobalShadows at: #CompilerClassShadow ) new

Shadows are a dual concept of the Polymorphic Inline Cache in the VM. Because they can be customized and more than one shadow can exist per Class they add to the power of our language.

Class Collapsing

Class/Method Collapsing is similar to some Refactoring operations but it is executed on the Bytecode level.

Method Collapsing