[Vm-dev] VM Maker: VMMaker.oscog-eem.212.mcz
David T. Lewis
lewis at mail.msen.com
Mon Nov 19 03:09:51 UTC 2012
Commit notice blocked due to size, forwarding trimmed version:
Delivered-To: list-vm-dev at lists.squeakfoundation.org
Date: Mon, 19 Nov 2012 00:56:42.496 0000
From: commits at source.squeak.org
To: vm-dev at lists.squeakfoundation.org
Reply-To: vm-dev at lists.squeakfoundation.org
Subject: VM Maker: VMMaker.oscog-eem.212.mcz
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
==================== Summary ====================
Time: 18 November 2012, 4:52:01.673 pm
Complete multiple bytecode set support plus NewsqueakV4 bytecode set.
Main change apart from bytecode set is to move the primitive index from a CompiledMethod's header into a callPrimitive: bytecode, and use the bits to expand the num literals field to 16 bits, adding a "has primitive" field to the header.
Change generateNewspeakCogVM & generateNewspeakStackVM to generate VMs with MUTLIPLEBYTECODESETS.
Add bytecode table for NewspeakV4. Rename shortConditionalJump to shortConditionalJumpFalse. Rename bytecodePrimBlockCopy to bytecodePrimSpecialSelector24. Make sure non-inlined special selector bytecodes (e.g. bytecodePrimDo) no longer assume argumentCount.
Refactor primitiveIndexOfMethodHeader: to primitiveIndexOfMethod:header: to allow extraction of prim index from callBrimitve: bytecode. Likewise callers of primitiveIndexOfMethodHeader:, e.g. canContextSwitchIfActivating: => canContextSwitchIfActivating:header:.
Move fetchNextBytecode after setMethod: in commonCallerReturn so that bytecodeSetSelector is correct on fetch.
Abstract out block creation from block creation bytecodes
Abstract out detecting the prim err code store in method activation routines.
Abstract out backwards branch event checking from backward branch bytecodes
Consolidate the simulated bytecode implementations that override out-of-order fetchNextBytecode using cCode:inSmalltalk: and delete the simulated ones.
Add process switched from to process switch trace.
Add bytecode address and header print to longPrintOop: (and bytecopde address to printOop:) for compiled method.
Fix printing oop twice for invalid oops in printOop:.
Change a few ~~'s to ~='s.
Fix some receivers self => objectMemory.
Change some users of BytesPerWord to BytesPerOop (e.g. internalPop:).
Use Objectmemory>>booleanObjectOf: where aprpopriate.
Add ImmediateTagMask & SmallIntegerShift and initialize them in initializeImmediates. Use for testing the V4 "has primitive" header flag.
Implement Newsqueak/Newspeak absent receiver sends in the StackInterpreter (but not yet in the KIT) in terms of shuffleArgumentsAndStoreAbsentReceiver:.
Add index 65 to primitiveVMParameter to answer a boolean indicating if the VM supports MUTLIPLEBYTECODESETS and hence understands the new alternative CompiledMethod header format. If the VM answers nil it does not understand the new format. If i answers false it does, but does not implement an alternate bytecode set.
Provide startInContextSuchThat: to allow avoidance of as-yet-untimulateable Newspeak image startup.
Junk old symbolic method printing and use VMCompiledMethodProxy to defer on image's symbolic printing.
Add RelativeDetailedInstructionPrinter to allow comparing stack depths in methods with different bytecode sets.
Refactor stack depth checking and add it to ceCheckForInterrupts
Fix allObjectsDo: to use freeStart as limit, not endOfMemory.
Move promptHex: up to VMClass and fix it for negative numbers.
Provide a set break block... dialog.
Fix couldBeFramePointer: for StackInterpreter (negative stack pointers).
Add ioLocalMicroseconds for Newspeak simulation.
Add NewsqueakV4 bytecode generators.
Add extension bytecode handling to all relevant scan, compilation and map traversal routines. Change signature of span and branch distance routines to take number of extensions. Make byte0 include bytecodeSetOffset.
Make genSpecialSelectorComparison cope with extensions on following conditional branch.
Change block descriptor format (ceClosureCopyDescriptor: argument) to increase range of num args and numCopied with V4 bytecode.
Eliminate generation of unnecessary long store code for prim err code, given that prologue already stores it.
Abstract out block creation bytecode size, push nil detection and push nil bytecode size, and firstSpecialSelectorBytecodeOffset.
Add the bytecode table initializers for NewsqueakV4 and clean-up all bytecode table initializers and generatorTableFrom:.
Eliminate isBackwardBranch and isBranch from CogBytecodeDescriptor and use spanFunction instead.
Move initializations in initializeMiscConstantsWith: around so that MULTIPLEBYTECODESETS et al are not zeroed when initializing the JIT after initializing the CoInterpreter.
Fix pc mapping tests so they're more efficient for in-image methods. Fix several bugs, add new methods and simplify CurrentImageCoInterpreterFacade for multiple bytecode sets. Make tests check bc & mc selectors match.
Rename traceLinkedSends to more general traceFlags.
Add options: to in-image cog:selector: to allow testing MULTIPLEBYTECODESETS jitting.
In disassembly, print bytecode pc next to annotation, and include selector in map
Eliminate some iuses of cCode: inSmalltalk: which were disabling inlining.
Change sharedCodeNamed:inCase: so that one can supply a bytecode rouitne name instead of a case index, e.g. sharedCodeNamed: 'commonReturn' inCase: 120 => sharedCodeNamed: 'commonReturn' inCase: #returnReceiver.
Make bytecode switch generation scan for duplicate cases to avoid duplication in MULTIPLEBYTECODESET form. Do so by refactoring bindVariableUsesIn: to bindVariableUsesIn:andConstantFoldIf:in:. Constant-fold so that currentBytecode bitAnd: mask looks the same even if currentBytecode differers by multiples of mask + 1.
Emit code at end of case as an expression. Include goto nodes in this.
Make gnuifier insert an assert at start of interpret that checks that the breakTable is the rigth size for MULTIPLEBYTECODESETS.
Improve formatting of comments in TParseNode, etc.
Fix bug with while creation that changed code generated if generated a second time. This made it easier for switch generation to detect shared cases.
Fix inlining of pointerForOop: et al by adding them to kernel: selectors. Eliminate warning in allocateMemory:minimum:imageFile:headerSize: using pointerForOop:. Use allocateMemory:minimum:imageFile:headerSize: in StackInterpreter>readImageFromFile:HeapSize:StartingAt:.
Add breakSrc/DestInlineSelector for better inlining debugging.
=============== Diff against VMMaker.oscog-lw.211 ===============
More information about the Vm-dev