[Ironruby-core] Code Review: InstructionRefactoring

Tomas Matousek Tomas.Matousek at microsoft.com
Mon Nov 9 16:19:02 EST 2009


tfpt review "/shelveset:InstructionRefactoring;REDMOND\tomat"

DLR, Python Ruby:

Makes all instruction classes internal except for the base Instruction class. Adds InstructionList class that represents incomplete instruction stream and provides Emit* instructions (like ILGenerator). The class is converted to InstructionArray when finished. Both implement a debug view so that it is easy to see what instructions are being emitted/interpreted.

Implements cache for LoadObject instruction - instead of allocating a new instruction per object constant we store the constants into an array and have specialized pre-generated instructions to load them.
Adds caching of branch instructions.
Adds debug cookies to instruction list in DEBUG builds - each instruction can be associates with one or more debug cookies. LocalAccess instructions use this to store the variable names. The cookies are used in debug view.

Groups related instructions into separate files.
Implements AddInstuction for all primitive arithmetic types.

Adds -X:CompilationThreshold option that sets the number of iterations before we start compiling code.
Obsoletes InterpretedMode, NoAdaptiveCompilation and PerfStats properties on LanguageSetup. The options can still be set via dictionary.

Reduces the number of instruction instances that are executed at least once during the run of "mspec ci core" from 1,274,454 to 280,684.

Tomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091109/3063079d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: InstructionRefactoring.diff
Type: application/octet-stream
Size: 37516 bytes
Desc: InstructionRefactoring.diff
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091109/3063079d/attachment-0001.obj>


More information about the Ironruby-core mailing list