Hi Stes,
> On Mar 31, 2020, at 3:53 AM, stes <stes(a)telenet.be> wrote:
>
>
>
> There seems to have been in the past a "change" in version numbering.
> That's quite common of course, version numbering schemes always change
>
> As far as I currently understand there is the 4.x series of Squeak images
> and vm's.
>
> # squeak -version
> 4.16.7-3775 #1 XShm Tue Mar 31 10:36:25 CEST 2020 cc
> SunOS gecko 5.11 11.3 i86pc i386 i86pc
> plugin path: /usr/lib/squeak/4.16.7-3775 [default:
> /usr/lib/squeak/4.16.7-3775/]
>
> Note that this is X.Y.Z version 3 numbers : 4.16.7
>
> On the other hand with the "Spur" recent 64 bit images, this is now replaced
> by GIT commit
>
> This is in the V5 Squeak with 5.x Squeak images in 64bit.
>
> # squeak -version
> 5.0-202003291930-solaris Mon Mar 30 17:47:52 CEST 2020 cc [Production Spur
> 64-bit VM]
> CoInterpreter VMMaker.oscog-eem.2731 uuid:
> 3c8dda9e-4706-4c3d-8c58-a284c47f5705 Mar 30 2020
> StackToRegisterMappingCogit VMMaker.oscog-eem.2731 uuid:
> 3c8dda9e-4706-4c3d-8c58-a284c47f5705 Mar 30 2020
> Date: Sun Mar 29 21:30:18 2020 CommitHash: 22060579c
> SunOS gecko 5.11 11.3 i86pc i386 i86pc
> plugin path: /usr/bin/../lib/squeak/5.0-202003291930-solaris [default:
> /usr/lib/squeak/5.0-202003291930-solaris/]
>
>
> Note that the plugin path and version here is X.Y 2 numbers 5.0.
>
> This is understandable as GIT has more concepts like "CommitHash" and so on
> , rather than 'old style' version numbers.
>
> However it could still be interesting I think to keep the tradition of the 3
> number version,
> this is with the updateSCCSversion script, I believe.
>
> Is there a plan to keep the VM version number to keep matching the Squeak
> image versions ?
No, and they should /not/ track image versions. The VM is always backwards-compatible; newer VMs can be used to run older images of the same architecture, so one can expect that any 5.x VM newer than a 5.x image can run that image. Images are forwards compatible; they may use new VM functionality that is absent in older VMs, and so one cannot expect newer images to run on older VMs.
So we (strive to) guarantee that a new VM with a given major release number runs all existing images of that major release number.
With the up coming 6.0 release we may choose to bump the VM to 6.0 also, which may give us the freedom to sunset old code. For example, VM event handling code is a convoluted mess and could do with being simplified. But if we wanted to produce bug fix versions of 5.x VMs, then doing this would mean at least duplicating the platforms/XXX/vm directories to have, say, platforms/XXX/vm5 alongside to hold the older code. We may choose to live with the messy event code for a while longer, in which case 6.0 VMs will happily run 5.x images.
>
> For the squeak image it is 6.0 alpha or 5.3 I see. But they also have 5.3
> rc1 , rc2 etc. That could correspond to 5.3.1 5.3.2 etc.
Which is not compelling, for reasons expressed above.
> --
> Sent from: http://forum.world.st/Squeak-VM-f104410.html
I noticed that Networking was working better in my Squeak4.6 image than in
Squeak5.3 on Solaris 11.
That is a polite way of saying that in my 5.3 vm the networking plugin
(socket plugin) was broken.
After debugging this, there is a "major" difference in the #include in the
subversion source code
------------------------------------------------------------------------
r1550 | piumarta | 2006-10-10 19:12:28 +0200 (Tue, 10 Oct 2006) | 1 line
"try to use O_ASYNC then FASYNC then FIOASYNC, otherwise give up"
The subversion source code for squeak4.6 is doing an #include <sys/file.h>
which in my case defines FASYNC, so I think that for the 4.6 vm it uses
FASYNC fnctl to make a socket asynchronous.
On the other hand in the 5.3 "opensmalltalk" networking code I noticed that
it choosing FIOASYNC.
By grepping for the FIOASYNC I can see this with:
bash-4.4$ strings squeak | grep ASYNC
ioctl(FIOASYNC, 1)
bash-4.4$ strings squeak | grep SIOCSPGRP
ioctl(SIOCSPGRP, getpid())
So I think it is making the "wrong" (?) choice in Squeak5.3 for the Solaris
case .
I am no expert in this, so I'm not sure "wrong" is the right word, but it is
not consistent in any case with the 4.6 image.
I've recompiled with the #include <sys/file.h> included just as with the
Squeak4.6 source code,
and it is much better now also in Squeak 5.3
The networking code seems to work again (it was broken without that change).
For example from the Squeak menu if I choose in 5.3 now (with FASYNC)
"Update Squeak"
it connects to the source.squeak.org server and download the Squeak 6.0 and
that seems to work now.
Before it would report "Cannot connect to x.x.x.x." it would also print
messages like
sqConnectToPort: Interrupted system call
But the fix seems in the end very simple : just #include <sys/file.h> in
the Solaris case ...
--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: acc4638b237c810df2697a6af1835601316ced28
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/acc4638b237c810df2…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-03-31 (Tue, 31 Mar 2020)
Changed paths:
A build.win32x86/common/Makefile.msvc
A build.win32x86/common/Makefile.msvc.flags
A build.win32x86/common/Makefile.msvc.plugin
A build.win32x86/common/Makefile.msvc.rules
A build.win32x86/common/Makefile.msvc.tools
A build.win64x64/common/Makefile.msvc
A build.win64x64/common/Makefile.msvc.flags
A build.win64x64/common/Makefile.msvc.plugin
A build.win64x64/common/Makefile.msvc.rules
A build.win64x64/common/Makefile.msvc.tools
A platforms/win32/plugins/BitBltPlugin/Makefile.msvc
A platforms/win32/plugins/FileAttributesPlugin/Makefile.msvc
A platforms/win32/plugins/FloatMathPlugin/Makefile.msvc
A platforms/win32/plugins/IA32ABI/Makefile.msvc
A platforms/win32/plugins/Mpeg3Plugin/Makefile.msvc
A platforms/win32/plugins/SerialPlugin/Makefile.msvc
A platforms/win32/plugins/SqueakFFIPrims/Makefile.msvc
A platforms/win32/plugins/SqueakSSL/Makefile.msvc
A platforms/win32/plugins/Win32OSProcessPlugin/Makefile.msvc
Log Message:
-----------
Add makefiles for Windows and Visual Studio, verified to work with MSVC
Community 2017. To use the Visual Studio debugger with these simply use the
Open Folder command, folowed by Open File on the relevant executable. No
Visual Studio projects are needed. Thanks to Ron Teitelbaum at 3DICC who has
funded this effort. [ci skip]
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 6f863ff37c32b32f16b6a4ad9d5b90baf5af7b8c
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/6f863ff37c32b32f16…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-03-31 (Tue, 31 Mar 2020)
Changed paths:
M platforms/Cross/vm/sqAssert.h
Log Message:
-----------
Fix asserta for the MSVC regime. asserta must answer the condition.
N.B. MSVC builds (and possibly Windows builds) are broken. I'm working on it.
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 1ee987969c39b8746e99a6dd3d9aa3818cd788bd
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1ee987969c39b8746e…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-03-31 (Tue, 31 Mar 2020)
Changed paths:
M nsspur64src/vm/cogit.h
M nsspur64src/vm/cogitX64SysV.c
M nsspur64src/vm/cogitX64WIN64.c
M nsspur64src/vm/cointerp.c
M nsspur64src/vm/cointerp.h
M nsspur64src/vm/gcc3x-cointerp.c
M nsspursrc/vm/cogit.h
M nsspursrc/vm/cogitARMv5.c
M nsspursrc/vm/cogitIA32.c
M nsspursrc/vm/cogitMIPSEL.c
M nsspursrc/vm/cointerp.c
M nsspursrc/vm/cointerp.h
M nsspursrc/vm/gcc3x-cointerp.c
M nsspurstack64src/vm/gcc3x-interp.c
M nsspurstack64src/vm/interp.c
M nsspurstacksrc/vm/gcc3x-interp.c
M nsspurstacksrc/vm/interp.c
M platforms/Cross/vm/sqMemoryAccess.h
M processors/IA32/bochs/cpu/cpu.h
M spur64src/vm/cogit.h
M spur64src/vm/cogitX64SysV.c
M spur64src/vm/cogitX64WIN64.c
M spur64src/vm/cointerp.c
M spur64src/vm/cointerp.h
M spur64src/vm/cointerpmt.c
M spur64src/vm/cointerpmt.h
M spur64src/vm/gcc3x-cointerp.c
M spur64src/vm/gcc3x-cointerpmt.c
M spurlowcode64src/vm/cogit.h
M spurlowcode64src/vm/cogitX64SysV.c
M spurlowcode64src/vm/cogitX64WIN64.c
M spurlowcode64src/vm/cointerp.c
M spurlowcode64src/vm/cointerp.h
M spurlowcode64src/vm/gcc3x-cointerp.c
M spurlowcodesrc/vm/cogit.h
M spurlowcodesrc/vm/cogitARMv5.c
M spurlowcodesrc/vm/cogitIA32.c
M spurlowcodesrc/vm/cogitMIPSEL.c
M spurlowcodesrc/vm/cointerp.c
M spurlowcodesrc/vm/cointerp.h
M spurlowcodesrc/vm/gcc3x-cointerp.c
M spurlowcodestack64src/vm/gcc3x-interp.c
M spurlowcodestack64src/vm/interp.c
M spurlowcodestacksrc/vm/gcc3x-interp.c
M spurlowcodestacksrc/vm/interp.c
M spursista64src/vm/cogit.h
M spursista64src/vm/cogitX64SysV.c
M spursista64src/vm/cogitX64WIN64.c
M spursista64src/vm/cointerp.c
M spursista64src/vm/cointerp.h
M spursista64src/vm/gcc3x-cointerp.c
M spursistasrc/vm/cogit.h
M spursistasrc/vm/cogitARMv5.c
M spursistasrc/vm/cogitIA32.c
M spursistasrc/vm/cogitMIPSEL.c
M spursistasrc/vm/cointerp.c
M spursistasrc/vm/cointerp.h
M spursistasrc/vm/gcc3x-cointerp.c
M spursrc/vm/cogit.h
M spursrc/vm/cogitARMv5.c
M spursrc/vm/cogitIA32.c
M spursrc/vm/cogitMIPSEL.c
M spursrc/vm/cointerp.c
M spursrc/vm/cointerp.h
M spursrc/vm/cointerpmt.c
M spursrc/vm/cointerpmt.h
M spursrc/vm/gcc3x-cointerp.c
M spursrc/vm/gcc3x-cointerpmt.c
M spurstack64src/vm/gcc3x-interp.c
M spurstack64src/vm/interp.c
M spurstack64src/vm/validImage.c
M spurstacksrc/vm/gcc3x-interp.c
M spurstacksrc/vm/interp.c
M spurstacksrc/vm/validImage.c
M src/plugins/FileAttributesPlugin/FileAttributesPlugin.c
M src/vm/cogit.h
M src/vm/cogitARMv5.c
M src/vm/cogitIA32.c
M src/vm/cogitMIPSEL.c
M src/vm/cointerp.c
M src/vm/cointerp.h
M src/vm/cointerpmt.c
M src/vm/cointerpmt.h
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
M stacksrc/vm/gcc3x-interp.c
M stacksrc/vm/interp.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.2736
CoInterpreter: No longer rely on setjmp/longjmp to get back into the interpreter from arbitrary locatons. Instead, since CoInterpreter maintains the base of the C stack in CFramePointer & CStackPointer, it is straight-forward for us to simply call interpret after doing the switch to the C stack, avoiding issues such as stack unwind problems in longjmp. And of course the implementation is simpler thn setjmp/longjmp and so faster."
Eliminate reenterInterpreter in the CoInterpreter (keeping it in the StackInterpreter; althoguh the success of the use in the CoInterpreter shows us that we should do the same, e.g. using assembler, in the StackInterpreter).
So now reentry into the interpreter from machine code does not use longjmp and we no longer use setjmp to establish the reentry-point. We just use CFramePointer & CStackPointer.
Export the warning functions for Windows DLLs that want to use assertions.
Get rid of the preambleCCode implementation of invalidCompactClassError:
Cogit x64, fix a slip in computing the size of SignExtend32RR.
Fix bad bad copy/past error in generateSignedShiftRight:on:indent:
Generic:
Fix a slip in oopForPointer in the USE_INLINE_MEMORY_ACCESSORS regime when
sqMemoryBase is not defined or is non-zero; one cannot perform arithmetic on
void pointers so the argument must be cast to char.
Bochs simulators: eliminate the TLB; it is not used in our configuration.
FileAttributesPlugin generated as per FileAttributesPlugin.oscog-eem.54
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2736.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.2736
Author: eem
Time: 31 March 2020, 6:20:49.211408 pm
UUID: 1dd4c38f-c0b4-4edd-9165-f4a54a988fe7
Ancestors: VMMaker.oscog-eem.2735
Cog: fix genInvokeInterpretTrampoline; it must establish the var base.
Eliminate reenterInterpreter in the CoInterpreter (keeping it in the StackInterpreter; althoguh the success of the use in the CoInterpreter shows us that we should do the same, e.g. using assembler, in the StackInterpreter).
So now reentry into the interpreter from machine code does not use longjmp and we no longer use setjmp to establish the reentry-point. We just use CFramePointer & CStackPointer.
Export the warning functions for Windows DLLs that want to use assertions.
Get rid of the preambleCCode implementation of invalidCompactClassError:
=============== Diff against VMMaker.oscog-eem.2735 ===============
Item was changed:
----- Method: CoInterpreter class>>declareCVarsIn: (in category 'translation') -----
declareCVarsIn: aCCodeGenerator
"Override to avoid repeating StackInterpreter's declarations and add our own extensions"
self class == thisContext methodClass ifFalse: [^self]. "Don't duplicate decls in subclasses"
aCCodeGenerator
addHeaderFile:'"sqCogStackAlignment.h"';
addHeaderFile:'"cogmethod.h"'.
NewspeakVM ifTrue:
[aCCodeGenerator addHeaderFile:'"nssendcache.h"'].
aCCodeGenerator
addHeaderFile: (aCCodeGenerator vmClass isThreadedVM
ifTrue: ['"cointerpmt.h"']
ifFalse: ['"cointerp.h"']);
addHeaderFile:'"cogit.h"'.
aCCodeGenerator vmClass
declareInterpreterVersionIn: aCCodeGenerator
defaultName: aCCodeGenerator interpreterVersion.
aCCodeGenerator
var: #heapBase type: #usqInt;
var: #statCodeCompactionUsecs type: #usqLong;
var: #maxLiteralCountForCompile
declareC: 'sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* ', MaxLiteralCountForCompile printString, ' */';
var: #minBackwardJumpCountForCompile
declareC: 'sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* ', MinBackwardJumpCountForCompile printString, ' */'.
- aCCodeGenerator removeVariable: 'atCache'. "Way too much trouble than it's worth in the Cog VM"
aCCodeGenerator
+ removeVariable: 'atCache'; "Way too much trouble than it's worth in the Cog VM"
+ removeVariable: 'reenterInterpreter'. "We can use the JIT and CFrame/StrackPointer for a lighter-weight solution."
+ aCCodeGenerator
var: #primTraceLogIndex type: #'unsigned char';
var: #primTraceLog declareC: 'sqInt primTraceLog[256]';
var: #traceLog
declareC: 'sqInt traceLog[TraceBufferSize /* ', TraceBufferSize printString, ' */]';
var: #traceSources type: #'char *' array: TraceSources.
aCCodeGenerator
var: #CFramePointer type: #'volatile usqIntptr_t';
var: #CStackPointer type: #'volatile usqIntptr_t'!
Item was added:
+ ----- Method: CoInterpreter>>activateFailingPrimitiveMethod (in category 'primitive support') -----
+ activateFailingPrimitiveMethod
+ "Assuming the primFailCode (and any other relevant failure state) has been set,
+ switch the VM to the interpreter if necessary (if in the CoInterpreter executing machine code),
+ and activate the newMethod (which is expected to have a primitive)."
+ self assert: primFailCode ~= 0.
+ self assert: (objectMemory addressCouldBeObj: newMethod).
+ self assert: (objectMemory isCompiledMethod: newMethod).
+ self assert: (self primitiveIndexOf: newMethod) ~= 0.
+ self justActivateNewMethod: true. "Frame must be interpreted"
+ cogit ceInvokeInterpret.
+ "NOTREACHED"
+ ^nil!
Item was changed:
----- Method: CoInterpreter>>callbackEnter: (in category 'callback support') -----
callbackEnter: callbackID
"Re-enter the interpreter for executing a callback"
+ | currentCStackPointer currentCFramePointer wasInMachineCode calledFromMachineCode |
- | currentCStackPointer currentCFramePointer savedReenterInterpreter
- wasInMachineCode calledFromMachineCode |
<volatile>
<export: true>
<var: #currentCStackPointer type: #usqIntptr_t>
<var: #currentCFramePointer type: #usqIntptr_t>
<var: #callbackID type: #'sqInt *'>
- <var: #savedReenterInterpreter type: #'jmp_buf'>
"For now, do not allow a callback unless we're in a primitiveResponse"
(self asserta: primitiveFunctionPointer ~= 0) ifFalse:
[^false].
self assert: primFailCode = 0.
"Check if we've exceeded the callback depth"
(self asserta: jmpDepth < MaxJumpBuf) ifFalse:
[^false].
jmpDepth := jmpDepth + 1.
wasInMachineCode := self isMachineCodeFrame: framePointer.
calledFromMachineCode := instructionPointer <= objectMemory startOfMemory.
"Suspend the currently active process"
suspendedCallbacks at: jmpDepth put: self activeProcess.
"We need to preserve newMethod explicitly since it is not activated yet
and therefore no context has been created for it. If the caller primitive
for any reason decides to fail we need to make sure we execute the correct
method and not the one 'last used' in the call back"
suspendedMethods at: jmpDepth put: newMethod.
self flag: 'need to debug this properly. Conceptually it is the right thing to do but it crashes in practice'.
false
ifTrue:
["Signal external semaphores since a signalSemaphoreWithIndex: request may
have been issued immediately prior to this callback before the VM has any
chance to do a signalExternalSemaphores in checkForEventsMayContextSwitch:"
self signalExternalSemaphores.
"If no process is awakened by signalExternalSemaphores then transfer
to the highest priority runnable one."
(suspendedCallbacks at: jmpDepth) = self activeProcess ifTrue:
[self transferTo: self wakeHighestPriority from: CSCallbackLeave]]
ifFalse:
[self transferTo: self wakeHighestPriority from: CSCallbackLeave].
"Typically, invoking the callback means that some semaphore has been
signaled to indicate the callback. Force an interrupt check as soon as possible."
self forceInterruptCheck.
+ "Save the previous CStackPointers..."
- "Save the previous CStackPointers and interpreter entry jmp_buf."
currentCStackPointer := CStackPointer.
currentCFramePointer := CFramePointer.
- self memcpy: savedReenterInterpreter asVoidPointer
- _: reenterInterpreter
- _: (self sizeof: #'jmp_buf').
cogit assertCStackWellAligned.
(self setjmp: (jmpBuf at: jmpDepth)) = 0 ifTrue: "Fill in callbackID"
[callbackID at: 0 put: jmpDepth.
self enterSmalltalkExecutive.
self assert: false "NOTREACHED"].
+ "Restore the previous CStackPointers..."
- "Restore the previous CStackPointers and interpreter entry jmp_buf."
self setCFramePointer: currentCFramePointer setCStackPointer: currentCStackPointer.
- self memcpy: reenterInterpreter
- _: (self cCoerceSimple: savedReenterInterpreter to: #'void *')
- _: (self sizeof: #'jmp_buf').
"Transfer back to the previous process so that caller can push result"
self putToSleep: self activeProcess yieldingIf: preemptionYields.
self transferTo: (suspendedCallbacks at: jmpDepth) from: CSCallbackLeave.
newMethod := suspendedMethods at: jmpDepth. "see comment above"
argumentCount := self argumentCountOf: newMethod.
self assert: wasInMachineCode = (self isMachineCodeFrame: framePointer).
calledFromMachineCode
ifTrue:
[instructionPointer asUnsignedInteger >= objectMemory startOfMemory ifTrue:
[self iframeSavedIP: framePointer put: instructionPointer.
instructionPointer := cogit ceReturnToInterpreterPC]]
ifFalse:
["Even if the context was flushed to the heap and rebuilt in transferTo:from:
above it will remain an interpreted frame because the context's pc would
remain a bytecode pc. So the instructionPointer must also be a bytecode pc."
self assert: (self isMachineCodeFrame: framePointer) not.
self assert: instructionPointer > objectMemory startOfMemory].
self assert: primFailCode = 0.
jmpDepth := jmpDepth-1.
^true!
Item was changed:
----- Method: CoInterpreter>>enterSmalltalkExecutiveImplementation (in category 'initialization') -----
enterSmalltalkExecutiveImplementation
"Main entry-point into the interpreter at each execution level, where an execution
level is either the start of execution or reentry for a callback. Capture the C stack
pointers so that calls from machine-code into the C run-time occur at this level.
This is the actual implementation, separated from enterSmalltalkExecutive so the
simulator can wrap it in an exception handler and hence simulate the setjmp/longjmp."
<inline: false>
cogit assertCStackWellAligned.
cogit ceCaptureCStackPointers.
- "Setjmp for reentry into interpreter from elsewhere, e.g. machine-code trampolines."
- self sigset: reenterInterpreter jmp: 0.
(self isMachineCodeFrame: framePointer) ifTrue:
[self returnToExecutive: false postContextSwitch: true
"NOTREACHED"].
self setMethod: (self iframeMethod: framePointer).
instructionPointer = cogit ceReturnToInterpreterPC ifTrue:
[instructionPointer := self iframeSavedIP: framePointer].
self assertValidExecutionPointe: instructionPointer r: framePointer s: stackPointer imbar: true line: #'__LINE__'.
self interpret.
^0!
Item was changed:
----- Method: CoInterpreter>>invokeInterpreterFromMachineCode (in category 'trampolines') -----
invokeInterpreterFromMachineCode
"This is just a rename for a send of interpret, but provides
a simulation hook; see the CogVMSimulator subclass."
<inline: #always>
+ cogit ceInvokeInterpret
- self interpret
"NOTREACHED"!
Item was changed:
----- Method: CoInterpreter>>restoreCStackStateForCallbackContext: (in category 'callback support') -----
restoreCStackStateForCallbackContext: vmCallbackContext
<var: #vmCallbackContext type: #'VMCallbackContext *'>
+ <inline: #always>
+ self setCFramePointer: vmCallbackContext savedCFramePointer setCStackPointer: vmCallbackContext savedCStackPointer!
- self setCFramePointer: vmCallbackContext savedCFramePointer setCStackPointer: vmCallbackContext savedCStackPointer.
- self memcpy: reenterInterpreter
- _: vmCallbackContext savedReenterInterpreter asVoidPointer
- _: (self sizeof: #'jmp_buf')!
Item was changed:
----- Method: CoInterpreter>>saveCStackStateForCallbackContext: (in category 'callback support') -----
saveCStackStateForCallbackContext: vmCallbackContext
<var: #vmCallbackContext type: #'VMCallbackContext *'>
+ <inline: #always>
vmCallbackContext
savedCStackPointer: CStackPointer asVoidPointer;
+ savedCFramePointer: CFramePointer asVoidPointer!
- savedCFramePointer: CFramePointer asVoidPointer.
- super saveCStackStateForCallbackContext: vmCallbackContext!
Item was removed:
- ----- Method: CogVMSimulator>>invalidCompactClassError: (in category 'interpreter shell') -----
- invalidCompactClassError: name
- self error: 'Class ', name, ' does not have the required compact class index'!
Item was changed:
----- Method: Cogit>>genInvokeInterpretTrampoline (in category 'initialization') -----
genInvokeInterpretTrampoline
"Switch to the C stack (do *not* save the Smalltalk stack pointers;
this is the caller's responsibility), and invoke interpret PDQ."
| startAddress |
<inline: false>
startAddress := methodZoneBase.
self zeroOpcodeIndex.
+ backEnd hasVarBaseRegister ifTrue:
+ [self MoveCq: self varBaseAddress R: VarBaseReg]. "Must happen first; value may be used in genLoadStackPointers"
cFramePointerInUse
ifTrue: [backEnd genLoadCStackPointers]
ifFalse: [backEnd genLoadCStackPointer].
+ self CallFullRT: #interpret registersToBeSavedMask: self emptyRegisterMask.
- self
- compileCallFor: #interpret
- numArgs: 0 arg: nil arg: nil arg: nil arg: nil
- resultReg: NoReg
- regsToSave: self emptyRegisterMask.
self outputInstructionsForGeneratedRuntimeAt: startAddress.
self recordGeneratedRunTime: 'ceInvokeInterpret' address: startAddress.
^startAddress!
Item was removed:
- ----- Method: InterpreterSimulator>>invalidCompactClassError: (in category 'interpreter shell') -----
- invalidCompactClassError: name
- self error: 'Class ', name, ' does not have the required compact class index'!
Item was added:
+ ----- Method: ObjectMemory>>invalidCompactClassError: (in category 'initialization') -----
+ invalidCompactClassError: className
+ <inline: false>
+ self cCode:
+ ['\nClass %s does not have the required compact class index\n' printf: className.
+ self exit: -1]
+ inSmalltalk:
+ [self error: 'Class ', className, ' does not have the required compact class index']!
Item was added:
+ ----- Method: SpurMemoryManager>>invalidCompactClassError: (in category 'initialization') -----
+ invalidCompactClassError: className
+ <inline: false>
+ self cCode:
+ ['\nClass %s does not have the required class index\n' printf: className.
+ self exit: -1]
+ inSmalltalk:
+ [self error: 'Class ', className, ' does not have the required class index']!
Item was changed:
----- Method: StackInterpreter class>>preambleCCode (in category 'translation') -----
preambleCCode
^
'/* Disable Intel compiler inlining of warning which is used for breakpoints */
#pragma auto_inline(off)
sqInt warnpid, erroronwarn;
+ EXPORT(void)
- void
warning(char *s) { /* Print an error message but don''t necessarily exit. */
if (erroronwarn) error(s);
if (warnpid)
printf("\n%s pid %ld\n", s, (long)warnpid);
else
printf("\n%s\n", s);
}
+ EXPORT(void)
- void
warningat(char *s, int l) { /* ditto with line number. */
/* use alloca to call warning so one does not have to remember to set two breakpoints... */
char *sl = alloca(strlen(s) + 16);
sprintf(sl, "%s %d", s, l);
warning(sl);
}
#pragma auto_inline(on)
- void
- invalidCompactClassError(char *s) { /* Print a (compact) class index error message and exit. */
- #if SPURVM
- printf("\nClass %s does not have the required class index\n", s);
- #else
- printf("\nClass %s does not have the required compact class index\n", s);
- #endif
- exit(-1);
- }
-
/*
* Define sigsetjmp and siglongjmp to be the most minimal setjmp/longjmp available on the platform.
* Note: on windows 64 via mingw-w64, the 2nd argument NULL to _setjmp prevents stack unwinding
+ * On windows 32 via MSVC _longjmpex prevents stack unwinding. Not supported on windows 64.
*/
#undef sigsetjmp
#undef siglongjmp
#if _MSC_VER
+ # if _WIN64
+ # define sigsetjmp(jb,ssmf) _setjmp(jb)
+ # define siglongjmp(jb,v) longjmp(jb,v)
+ # else
+ # define sigsetjmp(jb,ssmf) _setjmp(jb)
+ # define siglongjmp(jb,v) _longjmpex(jb,v)
+ # endif
- # define sigsetjmp(jb,ssmf) _setjmp(jb)
- # define siglongjmp(jb,v) longjmp(jb,v)
#elif _WIN64 && __GNUC__
# define sigsetjmp(jb,ssmf) _setjmp(jb,NULL)
# define siglongjmp(jb,v) longjmp(jb,v)
#elif _WIN32
# define sigsetjmp(jb,ssmf) setjmp(jb)
# define siglongjmp(jb,v) longjmp(jb,v)
#else
# define sigsetjmp(jb,ssmf) _setjmp(jb)
# define siglongjmp(jb,v) _longjmp(jb,v)
#endif
#define odd(v) ((int)(v)&1)
#define even(v) (!!odd(v))
'!
Item was removed:
- ----- Method: StackInterpreterSimulator>>invalidCompactClassError: (in category 'interpreter shell') -----
- invalidCompactClassError: name
- self error: 'Class ', name, ' does not have the required compact class index'!