Hi Jan,
On Thu, Sep 28, 2023 at 5:26 AM Jan Vrany jan@vrany.io wrote:
Hi Eliot and others,
I'm trying to build working VMMaker image in order to see what machine code Cog generates for some simple methods - without success so far. All this is on Linux on AMD64. Detailed report on what exactly I did and what errors I got is below.
In short: (i) does AArch64 sim plugin works on modern linuxes, does anyone use it there?
I don't know. I use macOS almost exclusively for development. I test and use other platforms occasionally. But as far as VMMaker development getting attention, I put my energy into making sure macOS supports all the simulators.
(ii) if so, what's the correct incantation to compile it.
In each platform build you'll find a directory for each of the sims: building/*/{bochsx64,bochsx86,gdbarm32,gdbarm64} and in each directory there is at least a conf.COG and a makeem script.l Most, but not all makeem scripts invoke conf.COG. You need to read to make sure.
So for each sim from bochsx64,bochsx86,gdbarm32,gdbarm64 on the platform you want to run VMMaker (in your case linux64x64) cd to the directory, run makeem. If there are errores report back here, or try and fix and submit a pull request.
This will build the support libraries (the guts of the sims) for the sim plugins src/plugins/{BochsIA32Plugin/BochsIA32Plugin.c,BochsX64Plugin/BochsX64Plugin.c,GdbARMPlugin/GdbARMPlugin.c,GdbARMv8Plugin/GdbARMv8Plugin.c}
The macos and linux VM makefiles make the plugins if the support directories contain teh sim libraries *and* the plugins.ext file in the VM build dir includes the plugin name. This is the case in squeak.cog.spur directories.
e.g. Aeolus.oscogvm$ head -9 building/linux64x64/squeak.cog.spur/plugins.ext # Copied, perhaps edited, from ../../../src/examplePlugins.ext EXTERNAL_PLUGINS = \ MIDIPlugin \ B3DAcceleratorPlugin \ ClipboardExtendedPlugin \ BochsIA32Plugin \ BochsX64Plugin \ GdbARMPlugin \ GdbARMv8Plugin \ Aeolus.oscogvm$
So once the support libs are built build a VM. It should end up with all the relevant plugins in products/sqcogspur64linuxht The destination i defined by the INSTALLDIR var in the mvm file, e.g. building/linux64x64/squeak.cog.spur/build/mvm
Sorry this is so messy.
(iii) using code in workspace labelled "In-Image Compilation Workspace",
is it supposed to work for every method and every ISA or is it
normal that it fails with DNU for some methods? I managed to compile but the trivial ones.
It is hoped that it works for all. But this isn't regularly tested. Changes elsewhere sometimes break in-image compilation. Bug reports and fixes gratefully received here. It would be great to add in-9mage compilation checks to a CI system near us, but I'm unable to put in that effort.
Thanks! Jan
HTH
================================================== ==== Below details what I did and errors I got ===
I'm using this commit:
commit 330d6779ad2ecbce1f07131f53d75cd168165f0b (HEAD -> Cog, origin/HEAD, origin/Cog) Author: Christoph Thiede christoph.thiede@student.hpi.de Date: Thu Aug 17 13:32:52 2023 +0200
Here's what I did:
IIUC, first I need to build bochs and BOCHS 64 simulator, so
cd opensmalltalk-vm/building/linux64x64/bochsx64 ./conf.COG ./makeem
That built just fine.
Then I built gdbarm64 simulator:
cd opensmalltalk-vm/building/linux64x64/gdbarm64$ ./conf.COG ./makeem
Again, no problem so far.
Then I tried to build the VM:
cd opensmalltalk-vm/building/linux64x64/squeak.cog.spur/build ./mvm
That failed soon:
.../opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:1832:10: warning: format string is not a string literal (potentially insecure) [-Wformat-security] printf(optionStrings[count]); ^~~~~~~~~~~~~~~~~~~~ .../opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:1832:10: note: treat the string as an argument to avoid this printf(optionStrings[count]); ^ "%s", .../opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:2324:38: error: incompatible function pointer types assigning to 'void (*)(int, siginfo_t *, void *)' from 'void (int, siginfo_t *, ucontext_t *)' (aka 'void (int, siginfo_t *, struct ucontext_t *)') [-Wincompatible-function-pointer-types] sigsegv_handler_action.sa_sigaction = sigsegv; ^ ~~~~~~~ .../opensmalltalk-vm/platforms/unix/vm/sqUnixMain.c:2331:38: error: incompatible function pointer types assigning to 'void (*)(int, siginfo_t *, void *)' from 'void (int, siginfo_t *, ucontext_t *)' (aka 'void (int, siginfo_t *, struct ucontext_t *)') [-Wincompatible-function-pointer-types] sigusr1_handler_action.sa_sigaction = sigusr1; ^ ~~~~~~~ 1 warning and 2 errors generated.
This is using clang version 16.0.6 (which mvm script enforces on line 20)
This is a PITA. Findimng a declaration that works across all platforms is difficult but required. That may imply per-platform macros to define the signature.
- Then I tried to build the VM again, this time with GCC (version 13.2.0
by editing mvm line 20):
cd opensmalltalk-vm/building/linux64x64/squeak.cog.spur/build ./mvm
This failed to compile too, though with different error:
libtool: compile: gcc -Wall -g -O2 -DNDEBUG -DDEBUGVM=0 -msse2 -DCOGMTVM=0 -pthread -DLSB_FIRST=1 -m64 -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused- value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -DHAVE_CONFIG_H -I.../opensmalltalk- vm/building/linux64x64/squeak.cog.spur/build -I.../opensmalltalk-vm/building/linux64x64/squeak.cog.spur/build -I.../opensmalltalk-vm/platforms/unix/vm - I.../opensmalltalk-vm/platforms/Cross/vm -I.../opensmalltalk-vm/src/spur64.cog -I/usr/local/include -I.../opensmalltalk- vm/platforms/Cross/plugins/GdbARMv8Plugin -I../../../../processors/ARM/gdb-8.3.1/include -I../../../../processors/ARM/gdb-8.3.1/sim/aarch64 -m64 -Wno-missing- braces -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -c .../opensmalltalk- vm/platforms/Cross/plugins/GdbARMv8Plugin/sqGdbARMv8Plugin.c -fPIC -DPIC -o .libs/sqGdbARMv8Plugin.o In file included from .../opensmalltalk-vm/platforms/Cross/vm/sqMemoryAccess.h:23, from .../opensmalltalk-vm/platforms/unix/vm/sqPlatformSpecific.h:35, from .../opensmalltalk-vm/platforms/Cross/vm/sqAssert.h:16, from .../opensmalltalk-vm/platforms/Cross/plugins/GdbARMv8Plugin/sqGdbARMv8Plugin.c:4: .../opensmalltalk-vm/building/linux64x64/squeak.cog.spur/build/config.h:40:2: error: #error This file was included too late. Please make sure it is included earlier 40 | #error This file was included too late. Please make sure it is included earlier | ^~~~~ .../opensmalltalk-vm/platforms/Cross/plugins/GdbARMv8Plugin/sqGdbARMv8Plugin.c:9:10: fatal error: aarch64/config.h: No such file or directory 9 | #include <aarch64/config.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:197: sqGdbARMv8Plugin.lo] Error 1 make: *** [Makefile:557: GdbARMv8Plugin.la] Error 2
I got bitten by this recently too. Someone changed the way we include config.h and that fucked everything up. It was a house of cards, but there we are. I'm not sure how to fix this. It works on macos, and that's my need.
- Then I gave up on AArch64 support and tried only with AMD64 by cleaning opensmalltalk-vm/building/linux64x64/gdbarm64. This time VM compiled
fine.
As a next step, I built VMMaker image:
cd opensmalltalk-vm/image ./buildspurtrunkvmmaker64image.sh -vm
../building/linux64x64/squeak.cog.spur/build/squeak.sh
This worked just fine, producing Spur64VMMaker.image
- Finally, I tried to see AMD64 (since I could not build AArch64 sim
plugin) machine code for some method, so I executed following smalltalk code in a workspace (which is just a modification of what is suggested in one of pre-opened workspaces I only changed memory manager class and ISA):
StackToRegisterMappingCogit genAndDis: SequenceableCollection>>#indexOf:startingAt:ifAbsent: options: #(ObjectMemory Spur64BitCoMemoryManager ISA X64).
You're missing some secret sauce:
StackToRegisterMappingCogit genAndDis: SequenceableCollection>>#indexOf:startingAt:ifAbsent: options: #(ObjectMemory Spur64BitCoMemoryManager MULTIPLEBYTECODESETS true ISA X64).
Maybe this should be the default for in-image compilation. Sorry.
This resulted in DNU:
28 September 2023 1:07:59.435358 pm
VM: unix - Smalltalk Image: Squeak6.1alpha [latest update: #22775]
SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/jv/Projects/Squeak/opensmalltalk-vm/image Trusted Dir /home/jv/Projects/Squeak/opensmalltalk-vm/image/secure Untrusted Dir /home/jv/Projects/Squeak/opensmalltalk-vm/image/My Squeak
UndefinedObject(Object)>>doesNotUnderstand: #isCMBlock Receiver: nil Arguments and temporary variables: aMessage: isCMBlock exception: MessageNotUnderstood: UndefinedObject>>isCMBlock resumeValue: nil Receiver's instance variables: nil
StackToRegisterMappingCogit(Cogit)>>disassembleMethod:on: Receiver: a StackToRegisterMappingCogit Arguments and temporary variables: surrogateOrAddress: nil aStream: a TranscriptStream cogMethod: nil mapEntries: nil codeRanges: nil i: nil iLimiT: nil Receiver's instance variables: coInterpreter: a CurrentImageCoInterpreterFacadeFor64BitSpurObjectRepresentation...etc... objectMemory: a CurrentImageCoInterpreterFacadeFor64BitSpurObjectRepresentation...etc... objectRepresentation: a CogObjectRepresentationFor64BitSpur processor: a BochsX64Alien64 rax: 00000101 (257) rbx: 00000000 rcx: 00000000 rdx...etc... processorLock: a Mutex() methodZone: a CogMethodZone methodZoneBase: 5784 codeBase: 1024 lastNInstructions: an OrderedCollection(a DoubleWordArray(0 0 0 0 4193216 41932...etc... simulatedAddresses: a Dictionary(#argumentCount->9223372036854775932 #ceActivateFailingPrimitiveMethod:...etc... simulatedTrampolines: a Dictionary(9223372036854775980->MessageSend(#ceSend:super:to:numArgs:...etc... simulatedVariableGetters: a Dictionary() simulatedVariableSetters: a Dictionary() printRegisters: false printInstructions: false compilationTrace: 0 clickConfirm: false clickStepping: false breakPC: nil breakBlock: nil singleStep: true guardPageSize: 1024 traceFlags: 8 traceStores: 0 breakMethod: nil methodObj: nil enumeratingCogMethod: nil methodHeader: nil initialPC: 0 endPC: nil methodOrBlockNumArgs: 0 inBlock: nil needsFrame: nil hasYoungReferent: false hasMovableLiteral: true primitiveIndex: nil backEnd: a CogInLineLiteralsX64Compiler literalsManager: an InLineLiteralsManager methodLabel: a CogInLineLiteralsX64Compiler (Label 0 @1698) stackCheckLabel: nil blockEntryLabel: nil blockEntryNoContextSwitch: nil blockNoContextSwitchOffset: nil stackOverflowCall: a CogInLineLiteralsX64Compiler (MoveCqR 0 ReceiverResultReg ...etc... sendMiss: a CogInLineLiteralsX64Compiler (Call 1680/690 E8 A0 F0 FF FF @15EB) missOffset: 48 entryPointMask: 7 checkedEntryAlignment: 0 uncheckedEntryAlignment: 7 cmEntryOffset: 48 entry: a CogInLineLiteralsX64Compiler (Label 1 @16C8) cmNoCheckEntryOffset: 71 noCheckEntry: a CogInLineLiteralsX64Compiler (Label 3 @1607) fullBlockEntry: nil cbEntryOffset: nil fullBlockNoContextSwitchEntry: nil cbNoSwitchEntryOffset: nil picMNUAbort: a CogInLineLiteralsX64Compiler (MoveCqR 0 ClassReg 48 31 C9 @16C0)...etc... picInterpretAbort: a CogInLineLiteralsX64Compiler (Call 2336/920 E8 58 F2 FF FF...etc... endCPICCase0: a CogInLineLiteralsX64Compiler (Label 3 @1617) endCPICCase1: a CogInLineLiteralsX64Compiler (Label 4 @162D) firstCPICCaseOffset: 87 cPICCaseSize: 22 cPICEndSize: 12 closedPICSize: 216 openPICSize: 360 fixups: a CArrayAccessor on: {a CogSSBytecodeFixup ( 0 ix 2) . a CogSSBytecodeFixup...etc... abstractOpcodes: a CArrayAccessor on: {a CogInLineLiteralsX64Compiler (MoveCqR ...etc... generatorTable: a CArrayAccessor on: {a CogBytecodeDescriptor (genPushReceiverVariableBytecode...etc... byte0: nil byte1: nil byte2: nil byte3: nil bytecodePC: nil bytecodeSetOffset: nil opcodeIndex: 64 numAbstractOpcodes: 100 blockStarts: nil blockCount: nil labelCounter: 5 cStackAlignment: 32 expectedSPAlignment: 0 expectedFPAlignment: 16 codeModified: nil maxLitIndex: nil ceMethodAbortTrampoline: nil cePICAbortTrampoline: nil ceCheckForInterruptTrampoline: 4648 ceCPICMissTrampoline: nil ceReturnToInterpreterTrampoline: 4872 ceBaseFrameReturnTrampoline: 4920 ceReapAndResetErrorCodeTrampoline: 2768 ceSendMustBeBooleanAddTrueTrampoline: 4544 ceSendMustBeBooleanAddFalseTrampoline: 4488 ceCannotResumeTrampoline: 4800 ceEnterCogCodePopReceiverReg: 4960 ceCallCogCodePopReceiverReg: 4984 ceCallCogCodePopReceiverAndClassRegs: 5008 cePrimReturnEnterCogCode: 5032 cePrimReturnEnterCogCodeProfiling: 5120 ceNonLocalReturnTrampoline: 4600 ceFetchContextInstVarTrampoline: 4696 ceStoreContextInstVarTrampoline: 4744 ceEnclosingObjectTrampoline: nil ceFlushDCache: nil ceFlushICache: nil ceTraceLinkedSendTrampoline: 9223372036854776172 ceTraceBlockActivationTrampoline: 9223372036854776180 ceTraceStoreTrampoline: 9223372036854776188 ceGetFP: 1024 ceGetSP: 1032 ceCaptureCStackPointers: 1040 ceInvokeInterpret: 4840 ordinarySendTrampolines: a CArrayAccessor on: #(1144 1208 1280 1352) superSendTrampolines: a CArrayAccessor on: #(1408 1480 1552 1624) directedSuperSendTrampolines: nil directedSuperBindingSendTrampolines: nil dynamicSuperSendTrampolines: nil outerSendTrampolines: nil selfSendTrampolines: nil firstSend: 1144 lastSend: 1624 realCEEnterCogCodePopReceiverReg: nil realCECallCogCodePopReceiverReg: nil realCECallCogCodePopReceiverAndClassRegs: nil trampolineTableIndex: 124 trampolineAddresses: a CArrayAccessor on: #('ceGetFP' 1024 'ceGetSP' 1032 'ceCa...etc... objectReferencesInRuntime: a CArrayAccessor on: #() runtimeObjectRefIndex: 0 cFramePointerInUse: true ceTryLockVMOwner: nil extA: 0 extB: 0 numExtB: 0 tempOop: nil numIRCs: nil indexOfIRC: nil theIRCs: nil receiverTags: nil implicitReceiverSendTrampolines: nil cogMethodSurrogateClass: CogMethodSurrogate64 cogBlockMethodSurrogateClass: CogBlockMethodSurrogate64 nsSendCacheSurrogateClass: NSSendCacheSurrogate64 cPICPrototype: a CogMethodSurrogate64 @5568/16r15C0 cPICEndOfCodeOffset: 209 cPICEndOfCodeLabel: a CogInLineLiteralsX64Compiler (Label 6 @1691) ceMallocTrampoline: nil ceFreeTrampoline: nil ceFFICalloutTrampoline: nil debugBytecodePointers: a Set() debugOpcodeIndices: a Set() disassemblingMethod: nil cogConstituentIndex: nil directedSendUsesBinding: nil processorFrameValid: false codeToDataDelta: 0 varBaseAddress: 2097160 codeZoneIsExecutableNotWritable: false debugAPISelector: nil shortCutTrampolineBlocks: an IdentityDictionary(#ceShortCutTraceBlockActivation:...etc... ioHighResClock: 996 perMethodProfile: nil instructionProfile: nil primitiveGeneratorTable: a CArrayAccessor on: {a CogPrimitiveDescriptor . a CogPrimitiveDescriptor...etc... introspectionDataIndex: nil introspectionData: nil prevBCDescriptor: nil numPushNilsFunction: #v3:Num:Push:Nils: pushNilSizeFunction: #v3PushNilSize:numInitialNils: methodOrBlockNumTemps: nil regArgsHaveBeenPushed: nil simStack: a CArrayAccessor on: {a CogSimStackEntry . a CogSimStackEntry . a CogSimStackEntry...etc... simStackPtr: nil simSpillBase: nil ceCallCogCodePopReceiverArg0Regs: 5248 ceCallCogCodePopReceiverArg1Arg0Regs: 5272 methodAbortTrampolines: a CArrayAccessor on: #(1680 1792 1904 2016) picAbortTrampolines: a CArrayAccessor on: #(2104 2216 2336 2456) picMissTrampolines: a CArrayAccessor on: #(2552 2608 2664 2720) ceCall0ArgsPIC: 5296 ceCall1ArgsPIC: 5328 ceCall2ArgsPIC: 5360 debugStackPointers: nil debugFixupBreaks: a Set() realCECallCogCodePopReceiverArg0Regs: nil realCECallCogCodePopReceiverArg1Arg0Regs: nil deadCode: nil useTwoPaths: nil currentCallCleanUpSize: nil simNativeStack: a CArrayAccessor on: {a CogSimStackNativeEntry . a CogSimStackNativeEntry...etc... simNativeStackPtr: nil simNativeSpillBase: nil simNativeStackSize: nil hasNativeFrame: nil compilationPass: nil
StackToRegisterMappingCogit(Cogit)>>disassembleMethod: Receiver: a StackToRegisterMappingCogit Arguments and temporary variables: surrogateOrAddress: nil Receiver's instance variables: coInterpreter: a CurrentImageCoInterpreterFacadeFor64BitSpurObjectRepresentation...etc... objectMemory: a CurrentImageCoInterpreterFacadeFor64BitSpurObjectRepresentation...etc... objectRepresentation: a CogObjectRepresentationFor64BitSpur processor: a BochsX64Alien64 rax: 00000101 (257) rbx: 00000000 rcx: 00000000 rdx...etc... processorLock: a Mutex() methodZone: a CogMethodZone methodZoneBase: 5784 codeBase: 1024 lastNInstructions: an OrderedCollection(a DoubleWordArray(0 0 0 0 4193216 41932...etc... simulatedAddresses: a Dictionary(#argumentCount->9223372036854775932 #ceActivateFailingPrimitiveMethod:...etc... simulatedTrampolines: a Dictionary(9223372036854775980->MessageSend(#ceSend:super:to:numArgs:...etc... simulatedVariableGetters: a Dictionary() simulatedVariableSetters: a Dictionary() printRegisters: false printInstructions: false compilationTrace: 0 clickConfirm: false clickStepping: false breakPC: nil breakBlock: nil singleStep: true guardPageSize: 1024 traceFlags: 8 traceStores: 0 breakMethod: nil methodObj: nil enumeratingCogMethod: nil methodHeader: nil initialPC: 0 endPC: nil methodOrBlockNumArgs: 0 inBlock: nil needsFrame: nil hasYoungReferent: false hasMovableLiteral: true primitiveIndex: nil backEnd: a CogInLineLiteralsX64Compiler literalsManager: an InLineLiteralsManager methodLabel: a CogInLineLiteralsX64Compiler (Label 0 @1698) stackCheckLabel: nil blockEntryLabel: nil blockEntryNoContextSwitch: nil blockNoContextSwitchOffset: nil stackOverflowCall: a CogInLineLiteralsX64Compiler (MoveCqR 0 ReceiverResultReg ...etc... sendMiss: a CogInLineLiteralsX64Compiler (Call 1680/690 E8 A0 F0 FF FF @15EB) missOffset: 48 entryPointMask: 7 checkedEntryAlignment: 0 uncheckedEntryAlignment: 7 cmEntryOffset: 48 entry: a CogInLineLiteralsX64Compiler (Label 1 @16C8) cmNoCheckEntryOffset: 71 noCheckEntry: a CogInLineLiteralsX64Compiler (Label 3 @1607) fullBlockEntry: nil cbEntryOffset: nil fullBlockNoContextSwitchEntry: nil cbNoSwitchEntryOffset: nil picMNUAbort: a CogInLineLiteralsX64Compiler (MoveCqR 0 ClassReg 48 31 C9 @16C0)...etc... picInterpretAbort: a CogInLineLiteralsX64Compiler (Call 2336/920 E8 58 F2 FF FF...etc... endCPICCase0: a CogInLineLiteralsX64Compiler (Label 3 @1617) endCPICCase1: a CogInLineLiteralsX64Compiler (Label 4 @162D) firstCPICCaseOffset: 87 cPICCaseSize: 22 cPICEndSize: 12 closedPICSize: 216 openPICSize: 360 fixups: a CArrayAccessor on: {a CogSSBytecodeFixup ( 0 ix 2) . a CogSSBytecodeFixup...etc... abstractOpcodes: a CArrayAccessor on: {a CogInLineLiteralsX64Compiler (MoveCqR ...etc... generatorTable: a CArrayAccessor on: {a CogBytecodeDescriptor (genPushReceiverVariableBytecode...etc... byte0: nil byte1: nil byte2: nil byte3: nil bytecodePC: nil bytecodeSetOffset: nil opcodeIndex: 64 numAbstractOpcodes: 100 blockStarts: nil blockCount: nil labelCounter: 5 cStackAlignment: 32 expectedSPAlignment: 0 expectedFPAlignment: 16 codeModified: nil maxLitIndex: nil ceMethodAbortTrampoline: nil cePICAbortTrampoline: nil ceCheckForInterruptTrampoline: 4648 ceCPICMissTrampoline: nil ceReturnToInterpreterTrampoline: 4872 ceBaseFrameReturnTrampoline: 4920 ceReapAndResetErrorCodeTrampoline: 2768 ceSendMustBeBooleanAddTrueTrampoline: 4544 ceSendMustBeBooleanAddFalseTrampoline: 4488 ceCannotResumeTrampoline: 4800 ceEnterCogCodePopReceiverReg: 4960 ceCallCogCodePopReceiverReg: 4984 ceCallCogCodePopReceiverAndClassRegs: 5008 cePrimReturnEnterCogCode: 5032 cePrimReturnEnterCogCodeProfiling: 5120 ceNonLocalReturnTrampoline: 4600 ceFetchContextInstVarTrampoline: 4696 ceStoreContextInstVarTrampoline: 4744 ceEnclosingObjectTrampoline: nil ceFlushDCache: nil ceFlushICache: nil ceTraceLinkedSendTrampoline: 9223372036854776172 ceTraceBlockActivationTrampoline: 9223372036854776180 ceTraceStoreTrampoline: 9223372036854776188 ceGetFP: 1024 ceGetSP: 1032 ceCaptureCStackPointers: 1040 ceInvokeInterpret: 4840 ordinarySendTrampolines: a CArrayAccessor on: #(1144 1208 1280 1352) superSendTrampolines: a CArrayAccessor on: #(1408 1480 1552 1624) directedSuperSendTrampolines: nil directedSuperBindingSendTrampolines: nil dynamicSuperSendTrampolines: nil outerSendTrampolines: nil selfSendTrampolines: nil firstSend: 1144 lastSend: 1624 realCEEnterCogCodePopReceiverReg: nil realCECallCogCodePopReceiverReg: nil realCECallCogCodePopReceiverAndClassRegs: nil trampolineTableIndex: 124 trampolineAddresses: a CArrayAccessor on: #('ceGetFP' 1024 'ceGetSP' 1032 'ceCa...etc... objectReferencesInRuntime: a CArrayAccessor on: #() runtimeObjectRefIndex: 0 cFramePointerInUse: true ceTryLockVMOwner: nil extA: 0 extB: 0 numExtB: 0 tempOop: nil numIRCs: nil indexOfIRC: nil theIRCs: nil receiverTags: nil implicitReceiverSendTrampolines: nil cogMethodSurrogateClass: CogMethodSurrogate64 cogBlockMethodSurrogateClass: CogBlockMethodSurrogate64 nsSendCacheSurrogateClass: NSSendCacheSurrogate64 cPICPrototype: a CogMethodSurrogate64 @5568/16r15C0 cPICEndOfCodeOffset: 209 cPICEndOfCodeLabel: a CogInLineLiteralsX64Compiler (Label 6 @1691) ceMallocTrampoline: nil ceFreeTrampoline: nil ceFFICalloutTrampoline: nil debugBytecodePointers: a Set() debugOpcodeIndices: a Set() disassemblingMethod: nil cogConstituentIndex: nil directedSendUsesBinding: nil processorFrameValid: false codeToDataDelta: 0 varBaseAddress: 2097160 codeZoneIsExecutableNotWritable: false debugAPISelector: nil shortCutTrampolineBlocks: an IdentityDictionary(#ceShortCutTraceBlockActivation:...etc... ioHighResClock: 996 perMethodProfile: nil instructionProfile: nil primitiveGeneratorTable: a CArrayAccessor on: {a CogPrimitiveDescriptor . a CogPrimitiveDescriptor...etc... introspectionDataIndex: nil introspectionData: nil prevBCDescriptor: nil numPushNilsFunction: #v3:Num:Push:Nils: pushNilSizeFunction: #v3PushNilSize:numInitialNils: methodOrBlockNumTemps: nil regArgsHaveBeenPushed: nil simStack: a CArrayAccessor on: {a CogSimStackEntry . a CogSimStackEntry . a CogSimStackEntry...etc... simStackPtr: nil simSpillBase: nil ceCallCogCodePopReceiverArg0Regs: 5248 ceCallCogCodePopReceiverArg1Arg0Regs: 5272 methodAbortTrampolines: a CArrayAccessor on: #(1680 1792 1904 2016) picAbortTrampolines: a CArrayAccessor on: #(2104 2216 2336 2456) picMissTrampolines: a CArrayAccessor on: #(2552 2608 2664 2720) ceCall0ArgsPIC: 5296 ceCall1ArgsPIC: 5328 ceCall2ArgsPIC: 5360 debugStackPointers: nil debugFixupBreaks: a Set() realCECallCogCodePopReceiverArg0Regs: nil realCECallCogCodePopReceiverArg1Arg0Regs: nil deadCode: nil useTwoPaths: nil currentCallCleanUpSize: nil simNativeStack: a CArrayAccessor on: {a CogSimStackNativeEntry . a CogSimStackNativeEntry...etc... simNativeStackPtr: nil simNativeSpillBase: nil simNativeStackSize: nil hasNativeFrame: nil compilationPass: nil
StackToRegisterMappingCogit class(Cogit class)>>genAndDis:options: Receiver: StackToRegisterMappingCogit Arguments and temporary variables: methodOrDoitString: (SequenceableCollection>>#indexOf:startingAt:ifAbsent: "a CompiledMethod...etc... optionsDictionaryOrArray: #(#ObjectMemory #Spur64BitCoMemoryManager #ISA #X64) tuple: {a CurrentImageCoInterpreterFacadeFor64BitSpurObjectRepresentation . a StackToRegisterMappingCogit...etc... Receiver's instance variables: superclass: SimpleStackBasedCogit methodDict: a MethodDictionary(size 607) format: 65731 instanceVariables: #('prevBCDescriptor' 'numPushNilsFunction' 'pushNilSizeFunct...etc... organization: ('accessing' simSelf) ('bytecode generator stores' genGenericStorePop:MaybeContextSlotIndex:needsStoreCheck:needsRestoreRcvr:needsImmutabilityCheck:...etc... subclasses: {RegisterAllocatingCogit . SistaCogit . StackToRegisterMappingCogitChecker...etc... name: #StackToRegisterMappingCogit classPool: a Dictionary(#NeedsMergeFixupFlag->nil #NeedsNonMergeFixupFlag->nil ...etc... sharedPools: an OrderedCollection(CogCompilationConstants VMMethodCacheConstants...etc... environment: Smalltalk category: #'VMMaker-JIT' timeStamp: 3873358619 generatorTable: a CArrayAccessor on: {a CogBytecodeDescriptor (genPushReceiverVariableBytecode...etc... primitiveTable: a CArrayAccessor on: {a CogPrimitiveDescriptor . a CogPrimitiveDescriptor...etc... numPushNilsFunction: #v3:Num:Push:Nils: pushNilSizeFunction: #v3PushNilSize:numInitialNils:
UndefinedObject>>DoIt Receiver: nil Arguments and temporary variables:
Receiver's instance variables:
nil
Compiler>>evaluateCue:ifFail: Receiver: a Compiler Arguments and temporary variables: aCue: a CompilationCue failBlock: [closure] in Compiler>>evaluateCue:ifFail:logged: methodNode: DoIt ^ StackToRegisterMappingCogit genAndDis: SequenceableCollecti...etc... method: (UndefinedObject>>#DoIt "a CompiledMethod(4121528)") value: nil Receiver's instance variables: parser: a Parser cue: a CompilationCue
Compiler>>evaluateCue:ifFail:logged: Receiver: a Compiler Arguments and temporary variables: aCue: a CompilationCue failBlock: [closure] in [] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:...etc... logFlag: true value: nil Receiver's instance variables: parser: a Parser cue: a CompilationCue
Compiler>>evaluate:in:to:environment:notifying:ifFail:logged: Receiver: a Compiler Arguments and temporary variables: textOrStream: a ReadStream aContext: nil receiver: nil anEnvironment: Smalltalk aRequestor: a SmalltalkEditor failBlock: [closure] in [] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:...etc... logFlag: true Receiver's instance variables: parser: a Parser cue: a CompilationCue
[] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo: Receiver: a SmalltalkEditor Arguments and temporary variables: aBlock: [closure] in SmalltalkEditor(TextEditor)>>evaluateSelection result: nil rcvr: nil ctxt: nil Receiver's instance variables: morph: a TextMorphForEditView(216877) model: a Workspace paragraph: a NewParagraph markBlock: a CharacterBlock with index 613 and character Character return and r...etc... pointBlock: a CharacterBlock with index 767 and rectangle 422@290 corner: 422@3...etc... beginTypeInIndex: nil emphasisHere: {a TextColor code: Color black} lastParenLocation: nil otherInterval: (613 to: 766) oldInterval: (627 to: 626) typeAhead: a WriteStream history: a TextEditorCommandHistory
FullBlockClosure(BlockClosure)>>on:do: Receiver: [closure] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo: Arguments and temporary variables: exceptionOrExceptionSet: OutOfScopeNotification handlerAction: [closure] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo:...etc... handlerActive: true handlerRearmed: false Receiver's instance variables: outerContext: SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo: startpcOrMethod: ([] in TextEditor>>#evaluateSelectionAndDo: "a CompiledBlock(3...etc... numArgs: 0 receiver: a SmalltalkEditor
SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo: Receiver: a SmalltalkEditor Arguments and temporary variables: aBlock: [closure] in SmalltalkEditor(TextEditor)>>evaluateSelection result: nil rcvr: nil ctxt: nil Receiver's instance variables: morph: a TextMorphForEditView(216877) model: a Workspace paragraph: a NewParagraph markBlock: a CharacterBlock with index 613 and character Character return and r...etc... pointBlock: a CharacterBlock with index 767 and rectangle 422@290 corner: 422@3...etc... beginTypeInIndex: nil emphasisHere: {a TextColor code: Color black} lastParenLocation: nil otherInterval: (613 to: 766) oldInterval: (627 to: 626) typeAhead: a WriteStream history: a TextEditorCommandHistory
SmalltalkEditor(TextEditor)>>evaluateSelection Receiver: a SmalltalkEditor Arguments and temporary variables:
Receiver's instance variables: morph: a TextMorphForEditView(216877) model: a Workspace paragraph: a NewParagraph markBlock: a CharacterBlock with index 613 and
character Character return and r...etc... pointBlock: a CharacterBlock with index 767 and rectangle 422@290 corner: 422@3...etc... beginTypeInIndex: nil emphasisHere: {a TextColor code: Color black} lastParenLocation: nil otherInterval: (613 to: 766) oldInterval: (627 to: 626) typeAhead: a WriteStream history: a TextEditorCommandHistory
SmalltalkEditor(TextEditor)>>doIt Receiver: a SmalltalkEditor Arguments and temporary variables:
Receiver's instance variables: morph: a TextMorphForEditView(216877) model: a Workspace paragraph: a NewParagraph markBlock: a CharacterBlock with index 613 and
character Character return and r...etc... pointBlock: a CharacterBlock with index 767 and rectangle 422@290 corner: 422@3...etc... beginTypeInIndex: nil emphasisHere: {a TextColor code: Color black} lastParenLocation: nil otherInterval: (613 to: 766) oldInterval: (627 to: 626) typeAhead: a WriteStream history: a TextEditorCommandHistory
SmalltalkEditor(TextEditor)>>doIt: Receiver: a SmalltalkEditor Arguments and temporary variables: aKeyboardEvent: [104@339 keystroke '<Ctrl-Cmd-d>' (100) 3090] Receiver's instance variables: morph: a TextMorphForEditView(216877) model: a Workspace paragraph: a NewParagraph markBlock: a CharacterBlock with index 613 and character Character return and r...etc... pointBlock: a CharacterBlock with index 767 and rectangle 422@290 corner: 422@3...etc... beginTypeInIndex: nil emphasisHere: {a TextColor code: Color black} lastParenLocation: nil otherInterval: (613 to: 766) oldInterval: (627 to: 626) typeAhead: a WriteStream history: a TextEditorCommandHistory
SmalltalkEditor(TextEditor)>>dispatchOnKeyboardEvent: Receiver: a SmalltalkEditor Arguments and temporary variables: aKeyboardEvent: [104@339 keystroke '<Ctrl-Cmd-d>' (100) 3090] honorCommandKeys: true typedChar: $d Receiver's instance variables: morph: a TextMorphForEditView(216877) model: a Workspace paragraph: a NewParagraph markBlock: a CharacterBlock with index 613 and character Character return and r...etc... pointBlock: a CharacterBlock with index 767 and rectangle 422@290 corner: 422@3...etc... beginTypeInIndex: nil emphasisHere: {a TextColor code: Color black} lastParenLocation: nil otherInterval: (613 to: 766) oldInterval: (627 to: 626) typeAhead: a WriteStream history: a TextEditorCommandHistory
SmalltalkEditor(TextEditor)>>keyStroke: Receiver: a SmalltalkEditor Arguments and temporary variables: anEvent: [104@339 keystroke '<Ctrl-Cmd-d>' (100) 3090] Receiver's instance variables: morph: a TextMorphForEditView(216877) model: a Workspace paragraph: a NewParagraph markBlock: a CharacterBlock with index 613 and character Character return and r...etc... pointBlock: a CharacterBlock with index 767 and rectangle 422@290 corner: 422@3...etc... beginTypeInIndex: nil emphasisHere: {a TextColor code: Color black} lastParenLocation: nil otherInterval: (613 to: 766) oldInterval: (627 to: 626) typeAhead: a WriteStream history: a TextEditorCommandHistory
[] in [] in TextMorphForEditView(TextMorph)>>keyStroke: Receiver: a TextMorphForEditView(216877) Arguments and temporary variables: evt: [104@339 keystroke '<Ctrl-Cmd-d>' (100) 3090] action: nil Receiver's instance variables: bounds: 0@0 corner: 753@308 owner: a TransformMorph(217319) submorphs: #() fullBounds: 0@0 corner: 753@308 color: Color black extension: a MorphExtension (1612197) [other: (unfocusedSelectionColor -> (Col...etc... borderWidth: 0 borderColor: Color black textStyle: a TextStyle(6) Bitmap DejaVu Sans 10.5pt 96ppi 14px Normal text: a Text for '"See what code the JIT generates for as method in the current...etc... wrapFlag: true paragraph: a NewParagraph editor: a SmalltalkEditor container: nil predecessor: nil successor: nil backgroundColor: nil margins: 3@2 corner: 3@2 readOnly: false autoFit: true plainTextOnly: false numCharactersPerLine: nil editView: a PluggableTextMorphPlus(1615011) acceptOnCR: false
TextMorphForEditView(TextMorph)>>handleInteraction:fromEvent: Receiver: a TextMorphForEditView(216877) Arguments and temporary variables: interactionBlock: [closure] in [] in TextMorphForEditView(TextMorph)>>keyStroke:...etc... evt: [104@339 keystroke '<Ctrl-Cmd-d>' (100) 3090] oldEditor: a SmalltalkEditor oldParagraph: a NewParagraph oldText: a Text for '"See what code the JIT generates for as method in the curr...etc... oldSelection: an OrderedCollection(3@242 corner: 750@290 3@290 corner: 422@306)...etc... Receiver's instance variables: bounds: 0@0 corner: 753@308 owner: a TransformMorph(217319) submorphs: #() fullBounds: 0@0 corner: 753@308 color: Color black extension: a MorphExtension (1612197) [other: (unfocusedSelectionColor -> (Col...etc... borderWidth: 0 borderColor: Color black textStyle: a TextStyle(6) Bitmap DejaVu Sans 10.5pt 96ppi 14px Normal text: a Text for '"See what code the JIT generates for as method in the current...etc... wrapFlag: true paragraph: a NewParagraph editor: a SmalltalkEditor container: nil predecessor: nil successor: nil backgroundColor: nil margins: 3@2 corner: 3@2 readOnly: false autoFit: true plainTextOnly: false numCharactersPerLine: nil editView: a PluggableTextMorphPlus(1615011) acceptOnCR: false
TextMorphForEditView>>handleInteraction:fromEvent: Receiver: a TextMorphForEditView(216877) Arguments and temporary variables: interActionBlock: [closure] in [] in TextMorphForEditView(TextMorph)>>keyStroke:...etc... evt: [104@339 keystroke '<Ctrl-Cmd-d>' (100) 3090] Receiver's instance variables: bounds: 0@0 corner: 753@308 owner: a TransformMorph(217319) submorphs: #() fullBounds: 0@0 corner: 753@308 color: Color black extension: a MorphExtension (1612197) [other: (unfocusedSelectionColor -> (Col...etc... borderWidth: 0 borderColor: Color black textStyle: a TextStyle(6) Bitmap DejaVu Sans 10.5pt 96ppi 14px Normal text: a Text for '"See what code the JIT generates for as method in the current...etc... wrapFlag: true paragraph: a NewParagraph editor: a SmalltalkEditor container: nil predecessor: nil successor: nil backgroundColor: nil margins: 3@2 corner: 3@2 readOnly: false autoFit: true plainTextOnly: false numCharactersPerLine: nil editView: a PluggableTextMorphPlus(1615011) acceptOnCR: false
--- The full stack --- UndefinedObject(Object)>>doesNotUnderstand: #isCMBlock StackToRegisterMappingCogit(Cogit)>>disassembleMethod:on: StackToRegisterMappingCogit(Cogit)>>disassembleMethod: StackToRegisterMappingCogit class(Cogit class)>>genAndDis:options: UndefinedObject>>DoIt Compiler>>evaluateCue:ifFail: Compiler>>evaluateCue:ifFail:logged: Compiler>>evaluate:in:to:environment:notifying:ifFail:logged: [] in SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo: FullBlockClosure(BlockClosure)>>on:do: SmalltalkEditor(TextEditor)>>evaluateSelectionAndDo: SmalltalkEditor(TextEditor)>>evaluateSelection SmalltalkEditor(TextEditor)>>doIt SmalltalkEditor(TextEditor)>>doIt: SmalltalkEditor(TextEditor)>>dispatchOnKeyboardEvent: SmalltalkEditor(TextEditor)>>keyStroke: [] in [] in TextMorphForEditView(TextMorph)>>keyStroke: TextMorphForEditView(TextMorph)>>handleInteraction:fromEvent: TextMorphForEditView>>handleInteraction:fromEvent:
[] in TextMorphForEditView(TextMorph)>>keyStroke: StandardToolSet class>>codeCompletionAround:textMorph:keyStroke: ToolSet class>>codeCompletionAround:textMorph:keyStroke: TextMorphForEditView(TextMorph)>>keyStroke: TextMorphForEditView>>keyStroke: TextMorphForEditView(Morph)>>handleKeystroke: TextMorphForEditView(TextMorph)>>handleKeystroke: KeyboardEvent>>sentTo: TextMorphForEditView(Morph)>>handleEvent: TextMorphForEditView(Morph)>>handleFocusEvent: MorphicEventDispatcher>>doHandlingForFocusEvent:with: MorphicEventDispatcher>>dispatchFocusEvent:with: TextMorphForEditView(Morph)>>processFocusEvent:using: TextMorphForEditView(Morph)>>processFocusEvent: [] in [] in [] in HandMorph>>sendFocusEvent:to:clear: [] in ActiveEventVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveEventVariable class(DynamicVariable class)>>value:during: [] in ActiveEventVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveEventVariable class>>value:during: KeyboardEvent(MorphicEvent)>>becomeActiveDuring: [] in [] in HandMorph>>sendFocusEvent:to:clear: [] in ActiveHandVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class(DynamicVariable class)>>value:during: [] in ActiveHandVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class>>value:during: HandMorph>>becomeActiveDuring: [] in HandMorph>>sendFocusEvent:to:clear: [] in ActiveWorldVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveWorldVariable class(DynamicVariable class)>>value:during: [] in ActiveWorldVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveWorldVariable class>>value:during: PasteUpMorph>>becomeActiveDuring: HandMorph>>sendFocusEvent:to:clear: HandMorph>>sendEvent:focus:clear: HandMorph>>sendKeyboardEvent: HandMorph>>handleEvent: -- and more not shown --